Uploaded image for project: 'Tika'
  1. Tika
  2. TIKA-2554

Subtypes for common text formats currently included in text/plain

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 1.17
    • None
    • mime
    • None

    Description

      Currently, we have a very large number of file extension globs all feeding into the text/plain mimetype. This includes not only variations on actual plain text, but also lots of other text-based formats (eg config or makefile/autoconf files). This list dates back quite a while (TIKA-85 seems to have added most of them)

      While this simplifies things in Tika, it has the downside of making it very tricky for people to add custom parsers for these text-based formats (eg https://stackoverflow.com/questions/48411421/define-a-mime-type-for-txt-files-for-tika where they want to handle .cfg differently to other .txt)

      Because of how AutoDetectParser works, as long as there's no more specific parser defined, if we create some new text/ subtypes which extend text/plain then there won't be any change in parsing behaviour. The only change would be for detection, where a more specific type would be returned

      I therefore propose that we pull some of these (file-magic-less) globs out into other text/ mimetypes with a parent of text/plan , grouped roughly by type

      Attachments

        Activity

          People

            Unassigned Unassigned
            nick Nick Burch
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: