[
https://issues.apache.org/jira/browse/TIKA-5041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18146154#comment-18146154
]
ASF GitHub Bot commented on TIKA-5041:
--------------------------------------
dschmidt commented on PR #3553:
URL: https://github.com/apache/tika/pull/3553#issuecomment-6945820090
Thanks, all of these were valid. Pushed a commit (plus a merge of `main` to
resolve the conflicts):
- `String.format` now takes `Locale.ROOT`.
- The CB7 branch is gone from `ComicBookDetector`; the detector only covers
RAR and tar now.
- `isPage` normalizes `\` to `/` before the `__MACOSX/` check.
- The tar pre-pass reads names in the factory's entry encoding, with a test
for a Latin-1 tar.
- Javadoc and import nits fixed.
Left as is: a streamed `.cbt` is still spooled and read twice, since the
cover has to be known before the entries are streamed.
One open question from the description: do you prefer this contained
detector, or should I fix the hint rule in `MimeTypes.applyHint` instead (let a
hint win when it specializes the base of a parameterized magic type)? That
would make the detector unnecessary, but it changes detection for every
versioned type.
> Comic book archives in RAR, 7z and tar (.cbr, .cb7, .cbt): detect them and
> emit the cover as THUMBNAIL
> ------------------------------------------------------------------------------------------------------
>
> Key: TIKA-5041
> URL: https://issues.apache.org/jira/browse/TIKA-5041
> Project: Tika
> Issue Type: Improvement
> Components: mime, parser
> Reporter: Dominik Schmidt
> Priority: Major
>
> TIKA-5032 handles comic book archives in a zip container ({{.cbz}},
> {{application/vnd.comicbook+zip}}): the first page in name order is the cover
> and is emitted as {{THUMBNAIL}}. The same convention exists for other
> containers, with no type in tika-mimetypes.xml today:
> * {{.cbr}}: RAR, IANA-registered as {{application/vnd.comicbook-rar}}
> (shared-mime-info: sub-class of {{application/vnd.rar}}, alias
> {{application/x-cbr}})
> * {{.cb7}}: 7z, {{application/x-cb7}} in shared-mime-info
> * {{.cbt}}: tar, {{application/x-cbt}} in shared-mime-info
> Registering them as sub-types of their container would let RarParser,
> SevenZParser and the tar path open them; picking the cover needs the full
> entry list, like the zip case. RAR support is limited (RAR5), so {{.cbr}} may
> only partly work.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)