This is an automated email from the ASF dual-hosted git repository.
tballison pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tika.git
The following commit(s) were added to refs/heads/main by this push:
new 47c1a0335d TIKA-4893 - Add supported formats adoc (#3166)
47c1a0335d is described below
commit 47c1a0335d6ec67a8a24cca5cdbf9868db90c161
Author: Tim Allison <[email protected]>
AuthorDate: Mon Sep 14 14:46:08 2026 -0400
TIKA-4893 - Add supported formats adoc (#3166)
---
.skills/devs/update-site-for-release/SKILL.md | 10 +-
docs/antora-playbook.yml | 1 +
docs/antora.yml | 2 +
docs/modules/ROOT/nav.adoc | 1 +
docs/modules/ROOT/pages/formats.adoc | 402 +++++++++++++++++++++
docs/modules/ROOT/pages/index.adoc | 2 +
docs/modules/ROOT/pages/maintainers/site.adoc | 7 +-
docs/modules/ROOT/pages/using-tika/index.adoc | 4 +-
docs/modules/ROOT/partials/supported-formats.adoc | 386 ++++++++++++++++++++
.../org/apache/tika/cli/SupportedFormatsAdoc.java | 105 ++++++
.../src/main/java/org/apache/tika/cli/TikaCLI.java | 6 +
.../test/java/org/apache/tika/cli/TikaCLITest.java | 27 ++
12 files changed, 943 insertions(+), 10 deletions(-)
diff --git a/.skills/devs/update-site-for-release/SKILL.md
b/.skills/devs/update-site-for-release/SKILL.md
index 5dc9522b21..f529f4d6f5 100644
--- a/.skills/devs/update-site-for-release/SKILL.md
+++ b/.skills/devs/update-site-for-release/SKILL.md
@@ -78,7 +78,7 @@ line, `tika.maintenance.version` = 3.x line).
| `pom.xml` `tika.maintenance.version` | leave | → `<NEW>` |
| `src/site/apt/<NEW>/` | **only `index.apt`** (Changes) | full 8-file set
(scaffold from prev 3.x) |
| `site.xml` entry | sub-menu linking `docs/<X.Y>.x/` pages + Changes + api |
full legacy sub-menu, expanded |
-| formats.apt | n/a (Antora docs) | regenerate from `tika-app` jar |
+| formats.apt | n/a — `docs/.../formats.adoc`; its generated partial is
test-enforced | regenerate from `tika-app` jar |
| javadoc | `clean install -Pfast` + `javadoc:aggregate` → `publish/<NEW>/api`
(step 7) | same |
| Antora docs | new minor → new `docs/<X.Y>.x` branch; patch → republish same
branch (step 7) | n/a |
| Download page | automatic | automatic |
@@ -250,10 +250,10 @@ miredot docs discontinued — skip.)
**4.x — Antora docs [AGENT].** Built from the tika git repo (main checkout),
not the src zip — the playbook pulls every `docs/{0..9}*` branch as a content
source. New minor: create `docs/<X.Y>.x` from the tag (or main), set
-`version: '<X.Y>.x'` + `tika-version` attribute in that branch's
-`docs/antora.yml`, and make sure main's antora.yml has `prerelease: true`
+`version: '<X.Y>.x'` + `tika-version` and `tika-javadoc-url` attributes in that
+branch's `docs/antora.yml`, and make sure main's antora.yml has `prerelease:
true`
[HUMAN commits]. Patch: commit doc changes + `tika-version` bump to the
-existing branch. Then:
+existing branch (bump `tika-javadoc-url` too). Then:
```bash
cd tika-main
./mvnw package -Papache-release -pl :tika-docs -DskipTests
@@ -352,7 +352,7 @@ commit outside `publish/` won't trigger. Still stuck ~30
min → ping `#asfinfra
- [ ] `pom.xml` versions (stable for 4.x; maintenance+parent for 3.x)
- [ ] `site.xml`: new entry added, previous same-track entry collapsed
- [ ] per-version apt docs (`index.apt` only for 4.x / full set for 3.x)
-- [ ] `formats.apt` regenerated (3.x only)
+- [ ] `formats.apt` regenerated (3.x only; 4.x formats page is in Antora,
partial test-enforced)
- [ ] `index.apt`: notable changes + curated contributors + shortlink
- [ ] `doap.rdf` entry
- [ ] `index.apt.vm`: news block + superseded CHANGES link → archive
diff --git a/docs/antora-playbook.yml b/docs/antora-playbook.yml
index b295476d6b..8e5febbadb 100644
--- a/docs/antora-playbook.yml
+++ b/docs/antora-playbook.yml
@@ -43,6 +43,7 @@ asciidoc:
# '@' = soft: each branch's antora.yml tika-version wins over this default
tika-version: '4.1.0-SNAPSHOT@'
tika-stable-version: '3.3.2'
+ tika-javadoc-url: 'https://tika.apache.org/4.0.0/api@'
# Enable source highlighting
source-highlighter: highlight.js
# Table of contents
diff --git a/docs/antora.yml b/docs/antora.yml
index a03a8f1f74..8e246100dc 100644
--- a/docs/antora.yml
+++ b/docs/antora.yml
@@ -25,6 +25,8 @@ start_page: index.adoc
asciidoc:
attributes:
tika-version: '4.1.0-SNAPSHOT'
+ # Latest published aggregate javadoc; per-release, so bump on docs/X.Y.x
branches.
+ tika-javadoc-url: 'https://tika.apache.org/4.0.0/api'
nav:
- modules/ROOT/nav.adoc
diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc
index aa5ec5047f..2a08054b81 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -14,6 +14,7 @@
// limitations under the License.
* xref:index.adoc[Home]
+* xref:formats.adoc[Supported Formats]
* xref:using-tika/index.adoc[Using Tika]
** xref:using-tika/java-api/index.adoc[Java API]
*** xref:using-tika/java-api/getting-started.adoc[Getting Started with the
Java API]
diff --git a/docs/modules/ROOT/pages/formats.adoc
b/docs/modules/ROOT/pages/formats.adoc
new file mode 100644
index 0000000000..198a592d01
--- /dev/null
+++ b/docs/modules/ROOT/pages/formats.adoc
@@ -0,0 +1,402 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+= Supported Document Formats
+:api: {tika-javadoc-url}
+
+This page lists the document formats from which the parsers shipped in Apache
+Tika {tika-version} extract text and/or metadata. Follow the links to the
parser
+javadocs for detail on how each format is handled.
+
+Tika *detects* far more formats than it parses. A type missing here is still
+identified by content detection; it just has no parser, and `tika-app` or
+`tika-server` returns metadata only.
+
+The families below are the parsers in the *standard* parser set: what
+`tika-app`, `tika-server` and the `tika-parsers-standard-package` artifact
+ship. Parsers that live in the `tika-parsers-ml` or `tika-parsers-extended`
+trees are marked as such. The <<full-list,full list>> at the bottom of the page
+is generated from the standard set on every build.
+
+== HyperText Markup Language
+
+The HyperText Markup Language (HTML) is the lingua franca of the web. Tika uses
+the https://jsoup.org/[jsoup] library to support virtually any kind of HTML
+found on the web. The output from
+link:{api}/org/apache/tika/parser/html/JSoupParser.html[JSoupParser] is
+guaranteed to be well-formed XHTML, and various heuristics keep things like
+inline scripts out of the extracted text.
+
+== XML and derived formats
+
+The Extensible Markup Language (XML) is a generic container for all kinds of
+content. Tika has custom parsers for some widely used XML vocabularies like
+XHTML, OOXML and ODF, but the default
+link:{api}/org/apache/tika/parser/xml/DcXMLParser.html[DcXMLParser] simply
+extracts the text content and ignores the XML structure. The one exception is
+Dublin Core metadata elements, which become document metadata.
+
+== Microsoft Office document formats
+
+Microsoft Office and some related applications produce documents in the generic
+OLE 2 Compound Document and Office Open XML (OOXML) formats. OLE 2 was the
+default from Office 97 until Office 2007 introduced OOXML.
+link:{api}/org/apache/tika/parser/microsoft/OfficeParser.html[OfficeParser] and
+link:{api}/org/apache/tika/parser/microsoft/ooxml/OOXMLParser.html[OOXMLParser]
+use the https://poi.apache.org/[Apache POI] libraries to extract text and
+metadata from both.
+
+Old, pre-OLE2 Excel files (Excel 2, 3 and 4) are handled by
+link:{api}/org/apache/tika/parser/microsoft/OldExcelParser.html[OldExcelParser].
+
+The older pure-XML office formats are handled by
+link:{api}/org/apache/tika/parser/microsoft/xml/SpreadsheetMLParser.html[SpreadsheetMLParser],
+link:{api}/org/apache/tika/parser/microsoft/xml/WordMLParser.html[WordMLParser]
+and
+link:{api}/org/apache/tika/parser/microsoft/ooxml/xwpf/ml2006/Word2006MLParser.html[Word2006MLParser].
+
+link:{api}/org/apache/tika/parser/microsoft/onenote/OneNoteParser.html[OneNoteParser]
+extracts text from OneNote notebooks, and
+link:{api}/org/apache/tika/parser/microsoft/MSOwnerFileParser.html[MSOwnerFileParser]
+pulls basic metadata from the temporary lock ("owner") files Office leaves
+beside open documents.
+
+== OpenDocument Format
+
+The OpenDocument format (ODF) is the native format of LibreOffice and
+OpenOffice.
+link:{api}/org/apache/tika/parser/odf/OpenDocumentParser.html[OpenDocumentParser]
+supports the packaged format and the earlier OpenOffice 1.0 format on which
+ODF is based;
+link:{api}/org/apache/tika/parser/odf/FlatOpenDocumentParser.html[FlatOpenDocumentParser]
+handles the single-file flat XML variants (`.fodt`, `.fods`, `.fodp`).
+
+== iWork document formats
+
+The Apple iWork formats (Pages, Numbers, Keynote) are supported by
+link:{api}/org/apache/tika/parser/iwork/IWorkPackageParser.html[IWorkPackageParser]
+for the original package format.
+link:{api}/org/apache/tika/parser/iwork/iwana/IWork13PackageParser.html[IWork13PackageParser]
+and
+link:{api}/org/apache/tika/parser/iwork/iwana/IWork18PackageParser.html[IWork18PackageParser]
+identify the 2013 and 2018 generations and extract metadata, embedded
+resources and the preview image; the body text of these newer formats is not
+yet extracted.
+
+== WordPerfect document formats
+
+The Corel WordPerfect Office formats are supported by
+link:{api}/org/apache/tika/parser/wordperfect/WordPerfectParser.html[WordPerfectParser]
+(WordPerfect WP6 and later) and
+link:{api}/org/apache/tika/parser/wordperfect/QuattroProParser.html[QuattroProParser]
+(QuattroPro QPW v9 and later).
+
+== Portable Document Format
+
+link:{api}/org/apache/tika/parser/pdf/PDFParser.html[PDFParser] parses PDF
+documents using the https://pdfbox.apache.org/[Apache PDFBox] library. It can
+extract inline images, annotations, forms and incremental-update history, and
+can hand pages or images to OCR or a vision model. See
+xref:configuration/parsers/pdf-parser.adoc[PDF Parser] for the options.
+
+== Electronic Publication Format
+
+link:{api}/org/apache/tika/parser/epub/EpubParser.html[EpubParser] supports the
+EPUB format used for many digital books.
+link:{api}/org/apache/tika/parser/xml/FictionBookParser.html[FictionBookParser]
+supports the XML-based FictionBook (`.fb2`) publishing format.
+
+== Rich Text Format
+
+link:{api}/org/apache/tika/parser/microsoft/rtf/RTFParser.html[RTFParser]
+extracts text, metadata and embedded objects from Rich Text Format documents.
+
+== Compression and packaging formats
+
+Tika uses the https://commons.apache.org/compress/[Commons Compress] library to
+support most compression and packaging formats.
+link:{api}/org/apache/tika/parser/pkg/CompressorParser.html[CompressorParser]
+handles the top-level compression formats (Gzip, BZip2, XZ, LZMA, Z, Brotli,
LZ4,
+Snappy, ...), then
+link:{api}/org/apache/tika/parser/pkg/PackageParser.html[PackageParser] and its
+subclasses
+link:{api}/org/apache/tika/parser/pkg/ZipParser.html[ZipParser] and
+link:{api}/org/apache/tika/parser/pkg/SevenZParser.html[SevenZParser] unpack
+the archive formats (Zip, 7Zip, Tar, AR, ARJ, CPIO, Dump, jar, ...) and pass
+each entry to a second parsing stage. See
+xref:advanced/zip-detection.adoc[ZIP Detection and Salvaging] for how damaged
+zips are handled.
+
+link:{api}/org/apache/tika/parser/pkg/RarParser.html[RarParser] supports the
+RAR archive format, which Commons Compress does not.
+
+link:{api}/org/apache/tika/parser/apple/AppleSingleFileParser.html[AppleSingleFileParser]
+supports resources packaged in AppleSingle and AppleDouble files, and
+link:{api}/org/apache/tika/parser/apple/PListParser.html[PListParser] reads
+Apple property lists in both XML and binary form.
+
+== Text formats
+
+Extracting text from plain-text files looks simple until character encodings
+enter the picture.
+link:{api}/org/apache/tika/parser/csv/TextAndCSVParser.html[TextAndCSVParser]
+runs Tika's encoding detectors (see
+xref:configuration/encoding-detectors.adoc[Encoding Detectors]) and recognizes
+CSV and TSV, emitting tables for those.
+
+link:{api}/org/apache/tika/parser/markdown/MarkdownParser.html[MarkdownParser]
+parses Markdown into structured XHTML rather than treating it as plain text.
+
+== Feed and syndication formats
+
+link:{api}/org/apache/tika/parser/feed/FeedParser.html[FeedParser] supports the
+RSS and Atom feed formats.
+link:{api}/org/apache/tika/parser/iptc/IptcAnpaParser.html[IptcAnpaParser]
+supports the IPTC ANPA news wire format.
+
+== Web archive formats
+
+link:{api}/org/apache/tika/parser/warc/WARCParser.html[WARCParser] and
+link:{api}/org/apache/tika/parser/wacz/WACZParser.html[WACZParser] unpack WARC
+and WACZ web archives and parse each captured response;
+link:{api}/org/apache/tika/parser/http/HttpParser.html[HttpParser] handles a
+single raw HTTP response.
+
+== Help formats
+
+link:{api}/org/apache/tika/parser/microsoft/chm/ChmParser.html[ChmParser]
+supports the CHM (compiled HTML help) format.
+
+== Audio formats
+
+Tika extracts metadata from common audio formats, and text from those that
+carry lyrics or other textual content. Extracted metadata includes sampling
+rates, channels, format information, artists, titles and so on.
+link:{api}/org/apache/tika/parser/audio/AudioParser.html[AudioParser] and
+link:{api}/org/apache/tika/parser/audio/MidiParser.html[MidiParser] use the
+standard `javax.sound` features for simple formats.
+link:{api}/org/apache/tika/parser/mp3/Mp3Parser.html[Mp3Parser] adds MP3, and
+link:{api}/org/apache/tika/parser/mp4/MP4Parser.html[MP4Parser] covers MP4
+audio. The Ogg family (Vorbis, Speex, Opus, FLAC) is supported by
+link:{api}/org/apache/tika/parser/ogg/VorbisParser.html[VorbisParser],
+link:{api}/org/apache/tika/parser/ogg/OpusParser.html[OpusParser],
+link:{api}/org/apache/tika/parser/ogg/SpeexParser.html[SpeexParser] and
+link:{api}/org/apache/tika/parser/ogg/FlacParser.html[FlacParser].
+
+Speech-to-text is available through
+link:{api}/org/apache/tika/parser/transcribe/aws/AmazonTranscribe.html[AmazonTranscribe]
+in the `tika-transcribe-aws` module of `tika-parsers-ml`; it is not part of the
+standard set.
+
+== Image formats
+
+link:{api}/org/apache/tika/parser/image/ImageParser.html[ImageParser] uses the
+standard `javax.imageio` feature to extract simple metadata from the image
+formats the Java platform supports, such as PNG, GIF and BMP. Richer metadata
+comes from
+link:{api}/org/apache/tika/parser/image/JpegParser.html[JpegParser] and
+link:{api}/org/apache/tika/parser/image/TiffParser.html[TiffParser], which use
+the metadata-extractor library for Exif, IPTC and XMP; and from
+link:{api}/org/apache/tika/parser/image/RawTiffParser.html[RawTiffParser] for
+camera RAW files built on TIFF.
+link:{api}/org/apache/tika/parser/image/HeifParser.html[HeifParser] (HEIF/HEIC,
+AVIF),
+link:{api}/org/apache/tika/parser/image/JXLParser.html[JXLParser] (JPEG XL),
+link:{api}/org/apache/tika/parser/image/WebPParser.html[WebPParser],
+link:{api}/org/apache/tika/parser/image/PSDParser.html[PSDParser],
+link:{api}/org/apache/tika/parser/image/BPGParser.html[BPGParser] and
+link:{api}/org/apache/tika/parser/image/ICNSParser.html[ICNSParser] extract
+metadata from their respective formats.
+
+link:{api}/org/apache/tika/parser/microsoft/WMFParser.html[WMFParser] and
+link:{api}/org/apache/tika/parser/microsoft/EMFParser.html[EMFParser] extract
+text from Microsoft WMF and EMF drawings; EMFParser also exposes embedded
+resources.
+
+Text inside images is not extracted by these parsers. See
+<<ocr-and-vision,OCR and vision-language models>>.
+
+== Video formats
+
+link:{api}/org/apache/tika/parser/video/FLVParser.html[FLVParser] supports the
+Flash video format with a simple parsing algorithm.
+link:{api}/org/apache/tika/parser/mp4/MP4Parser.html[MP4Parser] covers the MP4
+family (MP4, QuickTime, 3GPP, ...), extracting video metadata and any audio
+stream metadata. For the Ogg family,
+link:{api}/org/apache/tika/parser/ogg/OggParser.html[OggParser] and
+link:{api}/org/apache/tika/parser/ogg/TheoraParser.html[TheoraParser] extract a
+limited amount of metadata.
+
+Frame extraction, transcoding and probing through `ffmpeg` are available via
+the xref:configuration/parsers/external-parser.adoc[External Parser] when the
+tool is installed.
+
+== Java class files and archives
+
+link:{api}/org/apache/tika/parser/asm/ClassParser.html[ClassParser] extracts
+class names and method signatures from Java class files, and
+link:{api}/org/apache/tika/parser/pkg/PackageParser.html[PackageParser]
+supports jar archives.
+
+== Source code
+
+link:{api}/org/apache/tika/parser/code/SourceCodeParser.html[SourceCodeParser]
+handles a number of source code formats, including Java, C, C++ and Groovy,
+providing a formatted form of the code along with simple metadata.
+
+== Mail formats
+
+link:{api}/org/apache/tika/parser/mbox/MboxParser.html[MboxParser] extracts
+messages from the mbox format used by many mail archives and Unix mailboxes.
+link:{api}/org/apache/tika/parser/mail/RFC822Parser.html[RFC822Parser]
+processes single RFC 822 messages (`.eml`).
+link:{api}/org/apache/tika/parser/microsoft/pst/OutlookPSTParser.html[OutlookPSTParser]
+extracts messages from Microsoft Outlook PST stores, and
+link:{api}/org/apache/tika/parser/microsoft/OfficeParser.html[OfficeParser]
+handles single Outlook MSG files.
+link:{api}/org/apache/tika/parser/microsoft/TNEFParser.html[TNEFParser]
+extracts attachments from Microsoft TNEF (`winmail.dat`) wrappers.
+
+== CAD formats
+
+link:{api}/org/apache/tika/parser/dwg/DWGParser.html[DWGParser] extracts
+metadata from AutoCAD DWG files,
+link:{api}/org/apache/tika/parser/dgn/DGN8Parser.html[DGN8Parser] from
+MicroStation DGN v8 files, and
+link:{api}/org/apache/tika/parser/prt/PRTParser.html[PRTParser] from Cadkey
+PRT files.
+
+== Font formats
+
+link:{api}/org/apache/tika/parser/font/TrueTypeParser.html[TrueTypeParser]
+extracts simple metadata from TrueType fonts, and
+link:{api}/org/apache/tika/parser/font/AdobeFontMetricParser.html[AdobeFontMetricParser]
+does the same for Adobe Font Metrics files.
+
+== Publishing and localization formats
+
+link:{api}/org/apache/tika/parser/indesign/IDMLParser.html[IDMLParser] reads
+Adobe InDesign Markup (IDML) packages, and
+link:{api}/org/apache/tika/parser/mif/MIFParser.html[MIFParser] reads Adobe
+FrameMaker Interchange Format.
+link:{api}/org/apache/tika/parser/hwp/HwpV5Parser.html[HwpV5Parser] supports
+the Hangul Word Processor (HWP) v5 format.
+
+For translation memory and localization interchange,
+link:{api}/org/apache/tika/parser/xliff/XLIFF12Parser.html[XLIFF12Parser] and
+link:{api}/org/apache/tika/parser/xliff/XLZParser.html[XLZParser] handle XLIFF
+1.2 and its zipped form, and
+link:{api}/org/apache/tika/parser/tmx/TMXParser.html[TMXParser] handles
+Translation Memory eXchange.
+
+== Scientific formats
+
+In the standard set,
+link:{api}/org/apache/tika/parser/dif/DIFParser.html[DIFParser] extracts
+attribute metadata from the GCMD Directory Interchange Format,
+link:{api}/org/apache/tika/parser/mat/MatParser.html[MatParser] from MATLAB
+`.mat` files, and
+link:{api}/org/apache/tika/parser/geogebra/GeoGebraParser.html[GeoGebraParser]
+from GeoGebra worksheets.
+
+The `tika-parser-scientific-package` artifact in `tika-parsers-extended` adds
+link:{api}/org/apache/tika/parser/gdal/GDALParser.html[GDALParser],
+link:{api}/org/apache/tika/parser/geoinfo/GeographicInformationParser.html[GeographicInformationParser]
+(ISO 19139),
+link:{api}/org/apache/tika/parser/grib/GribParser.html[GribParser],
+link:{api}/org/apache/tika/parser/hdf/HDFParser.html[HDFParser],
+link:{api}/org/apache/tika/parser/isatab/ISArchiveParser.html[ISArchiveParser]
+(ISA-Tab) and
+link:{api}/org/apache/tika/parser/netcdf/NetCDFParser.html[NetCDFParser]. These
+pull in large native and scientific dependencies and are not in `tika-app`.
+
+== Executable programs and libraries
+
+link:{api}/org/apache/tika/parser/executable/ExecutableParser.html[ExecutableParser]
+extracts platform, architecture and type metadata from a range of executable
+and library formats, such as Windows PE and Linux/BSD ELF binaries;
+link:{api}/org/apache/tika/parser/executable/UniversalExecutableParser.html[UniversalExecutableParser]
+unpacks macOS universal (fat) binaries.
+
+== Crypto formats
+
+link:{api}/org/apache/tika/parser/crypto/Pkcs7Parser.html[Pkcs7Parser] parses
+the content of PKCS7 signed messages, without information from the outer PKCS7
+wrapper. See xref:configuration/detectors.adoc[Detectors] for enabling finer
+CMS detection.
+link:{api}/org/apache/tika/parser/crypto/TSDParser.html[TSDParser] extracts
+metadata from Time Stamped Data envelopes and exposes the wrapped content.
+
+== Database formats
+
+link:{api}/org/apache/tika/parser/microsoft/JackcessParser.html[JackcessParser]
+extracts metadata and tabular content from Microsoft Access databases.
+link:{api}/org/apache/tika/parser/dbf/DBFParser.html[DBFParser] supports dBase
+(`.dbf`) files before version 7, as used by dBase, FoxBASE, FoxPro and ESRI
+Shapefiles.
+link:{api}/org/apache/tika/parser/sas/SAS7BDATParser.html[SAS7BDATParser]
+reads SAS `.sas7bdat` datasets.
+
+link:{api}/org/apache/tika/parser/sqlite3/SQLite3Parser.html[SQLite3Parser]
+extracts SQLite3 content in tabular form. It ships in the
+`tika-parser-sqlite3-package` artifact in `tika-parsers-extended` because of
+the native `sqlite-jdbc` dependency; it is not in `tika-app`.
+
+[#ocr-and-vision]
+== OCR and vision-language models
+
+None of the image parsers above read text out of pixels. Tika offers three
+ways to do that, all off by default and all documented under Configuration:
+
+* xref:configuration/parsers/tesseract-ocr-parser.adoc[Tesseract OCR] via
+
link:{api}/org/apache/tika/parser/ocr/TesseractOCRParser.html[TesseractOCRParser],
+ which runs the `tesseract` binary when it is installed;
+* xref:configuration/parsers/tess4j-parser.adoc[Tess4J] for in-process
+ Tesseract (`tika-parsers-ml`);
+* xref:configuration/parsers/vlm-parsers.adoc[VLM parsers] --
+ link:{api}/org/apache/tika/parser/vlm/ClaudeVLMParser.html[Claude],
+ link:{api}/org/apache/tika/parser/vlm/GeminiVLMParser.html[Gemini] and
+ link:{api}/org/apache/tika/parser/vlm/OpenAIVLMParser.html[OpenAI] -- for
+ documents OCR cannot read well.
+
+xref:configuration/inference.adoc[Inference: Engines and Bindings] describes
how
+these engines are attached to the PDF and image parsers, and how to plug in a
+xref:developers/custom-ocr-engine.adoc[custom OCR engine].
+
+== Natural language processing
+
+The `tika-parser-nlp-package` artifact in `tika-parsers-ml` wraps external NLP
+tools as parsers that enrich the output of other parsers:
+link:{api}/org/apache/tika/parser/ner/NamedEntityParser.html[NamedEntityParser]
+(named entity recognition via OpenNLP, Stanford CoreNLP, MITIE, NLTK or regex),
+link:{api}/org/apache/tika/parser/journal/JournalParser.html[JournalParser]
+(journal article metadata via a Grobid server),
+link:{api}/org/apache/tika/parser/ctakes/CTAKESParser.html[CTAKESParser]
+(clinical text via Apache cTAKES) and
+link:{api}/org/apache/tika/parser/geo/topic/GeoParser.html[GeoParser]
+(geographic entity resolution against a gazetteer). Each needs models,
+training data or a running service; see the parser javadocs.
+
+[#full-list]
+== Full list of supported formats in the standard parsers
+
+Generated from the parsers on the `tika-app` classpath with
+`tika-app --list-parser-details-adoc`. Parsers that only advertise types once
+an external tool or service is configured (Tesseract, the VLM parsers, the
+External Parser) are not listed.
+
+include::partial$supported-formats.adoc[]
diff --git a/docs/modules/ROOT/pages/index.adoc
b/docs/modules/ROOT/pages/index.adoc
index af3c5ee109..8ad35fd330 100644
--- a/docs/modules/ROOT/pages/index.adoc
+++ b/docs/modules/ROOT/pages/index.adoc
@@ -29,6 +29,8 @@ missing or misleading extension does not change the result.
== Where to start
+* xref:formats.adoc[Supported Formats] -- what Tika parses, family by family,
plus the
+ generated parser-to-media-type list.
* xref:using-tika/index.adoc[Using Tika] -- choose an integration method: Java
API,
command line, REST server, or gRPC.
* xref:pipes/index.adoc[Pipes] -- process-isolated, fault-tolerant extraction
at scale.
diff --git a/docs/modules/ROOT/pages/maintainers/site.adoc
b/docs/modules/ROOT/pages/maintainers/site.adoc
index e658863b52..48648bd0a5 100644
--- a/docs/modules/ROOT/pages/maintainers/site.adoc
+++ b/docs/modules/ROOT/pages/maintainers/site.adoc
@@ -151,11 +151,12 @@ When releasing a new minor line (e.g., 4.0.0 creates
`docs/4.0.x`):
# post-tag docs improvements should ship too)
git checkout -b docs/4.0.x 4.0.0
-# 2. Set the version (and the tika-version attribute) in docs/antora.yml
+# 2. Set the version (and the tika-version / tika-javadoc-url attributes) in
docs/antora.yml
# version: '4.0.x'
# asciidoc:
# attributes:
# tika-version: '4.0.0'
+# tika-javadoc-url: 'https://tika.apache.org/4.0.0/api'
git commit -am "Set docs version to 4.0.x"
git push origin docs/4.0.x
@@ -175,8 +176,8 @@ svn commit -m "Publish 4.0.x docs"
----
For a patch release (e.g. 4.0.1), there is no new branch: merge or cherry-pick
-the doc changes to `docs/4.0.x`, bump its `tika-version` attribute, rebuild and
-republish in place.
+the doc changes to `docs/4.0.x`, bump its `tika-version` and `tika-javadoc-url`
+attributes, rebuild and republish in place.
=== Updating Released Documentation
diff --git a/docs/modules/ROOT/pages/using-tika/index.adoc
b/docs/modules/ROOT/pages/using-tika/index.adoc
index 76bdd16a4b..bb68ec4093 100644
--- a/docs/modules/ROOT/pages/using-tika/index.adoc
+++ b/docs/modules/ROOT/pages/using-tika/index.adoc
@@ -57,5 +57,5 @@ xref:using-tika/docker.adoc[Running Tika in Docker].
* https://tika.apache.org/download.html[Downloads] — jars, the `tika-app` and
`tika-server` zips
* https://hub.docker.com/r/apache/tika[Docker images] — `apache/tika` on
Docker Hub
* https://tika.apache.org/[Apache Tika website]
-* https://tika.apache.org/{tika-stable-version}/formats.html[Supported
formats] — what Tika can parse
-* https://tika.apache.org/{tika-stable-version}/api/[Javadoc]
+* xref:formats.adoc[Supported formats] — what Tika can parse
+* {tika-javadoc-url}/[Javadoc]
diff --git a/docs/modules/ROOT/partials/supported-formats.adoc
b/docs/modules/ROOT/partials/supported-formats.adoc
new file mode 100644
index 0000000000..c261b37641
--- /dev/null
+++ b/docs/modules/ROOT/partials/supported-formats.adoc
@@ -0,0 +1,386 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+// Generated by `tika-app --list-parser-details-adoc`. Do not edit by hand;
+// regenerate and commit. TikaCLITest fails when this file is stale.
+
+* `org.apache.tika.parser.apple.`
link:{tika-javadoc-url}/org/apache/tika/parser/apple/AppleSingleFileParser.html[AppleSingleFileParser]
+** `application/applefile`
+* `org.apache.tika.parser.apple.`
link:{tika-javadoc-url}/org/apache/tika/parser/apple/PListParser.html[PListParser]
+** `application/x-bplist`
+** `application/x-bplist-itunes`
+** `application/x-bplist-memgraph`
+** `application/x-bplist-webarchive`
+** `application/x-plist`
+* `org.apache.tika.parser.asm.`
link:{tika-javadoc-url}/org/apache/tika/parser/asm/ClassParser.html[ClassParser]
+** `application/java-vm`
+* `org.apache.tika.parser.audio.`
link:{tika-javadoc-url}/org/apache/tika/parser/audio/AudioParser.html[AudioParser]
+** `audio/basic`
+** `audio/vnd.wave`
+** `audio/x-aiff`
+** `audio/x-wav`
+* `org.apache.tika.parser.audio.`
link:{tika-javadoc-url}/org/apache/tika/parser/audio/MidiParser.html[MidiParser]
+** `application/x-midi`
+** `audio/midi`
+* `org.apache.tika.parser.code.`
link:{tika-javadoc-url}/org/apache/tika/parser/code/SourceCodeParser.html[SourceCodeParser]
+** `text/x-c++src`
+** `text/x-groovy`
+** `text/x-java-source`
+* `org.apache.tika.parser.crypto.`
link:{tika-javadoc-url}/org/apache/tika/parser/crypto/Pkcs7Parser.html[Pkcs7Parser]
+** `application/pkcs7-mime`
+** `application/pkcs7-signature`
+* `org.apache.tika.parser.crypto.`
link:{tika-javadoc-url}/org/apache/tika/parser/crypto/TSDParser.html[TSDParser]
+** `application/timestamped-data`
+* `org.apache.tika.parser.csv.`
link:{tika-javadoc-url}/org/apache/tika/parser/csv/TextAndCSVParser.html[TextAndCSVParser]
+** `text/csv`
+** `text/plain`
+** `text/tsv`
+* `org.apache.tika.parser.dbf.`
link:{tika-javadoc-url}/org/apache/tika/parser/dbf/DBFParser.html[DBFParser]
+** `application/x-dbf`
+* `org.apache.tika.parser.dgn.`
link:{tika-javadoc-url}/org/apache/tika/parser/dgn/DGN8Parser.html[DGN8Parser]
+** `image/vnd.dgn; version=8`
+* `org.apache.tika.parser.dif.`
link:{tika-javadoc-url}/org/apache/tika/parser/dif/DIFParser.html[DIFParser]
+** `application/dif+xml`
+* `org.apache.tika.parser.dwg.`
link:{tika-javadoc-url}/org/apache/tika/parser/dwg/DWGParser.html[DWGParser]
+** `image/vnd.dwg`
+* `org.apache.tika.parser.epub.`
link:{tika-javadoc-url}/org/apache/tika/parser/epub/EpubParser.html[EpubParser]
+** `application/epub+zip`
+** `application/x-ibooks+zip`
+* `org.apache.tika.parser.executable.`
link:{tika-javadoc-url}/org/apache/tika/parser/executable/ExecutableParser.html[ExecutableParser]
+** `application/x-coredump`
+** `application/x-elf`
+** `application/x-executable`
+** `application/x-mach-o`
+** `application/x-mach-o-bundle`
+** `application/x-mach-o-core`
+** `application/x-mach-o-dsym`
+** `application/x-mach-o-dylib`
+** `application/x-mach-o-dylib-stub`
+** `application/x-mach-o-dylinker`
+** `application/x-mach-o-executable`
+** `application/x-mach-o-fvmlib`
+** `application/x-mach-o-kext-bundle`
+** `application/x-mach-o-object`
+** `application/x-mach-o-preload`
+** `application/x-msdownload`
+** `application/x-object`
+** `application/x-sharedlib`
+* `org.apache.tika.parser.executable.`
link:{tika-javadoc-url}/org/apache/tika/parser/executable/UniversalExecutableParser.html[UniversalExecutableParser]
+** `application/x-mach-o-universal`
+* `org.apache.tika.parser.feed.`
link:{tika-javadoc-url}/org/apache/tika/parser/feed/FeedParser.html[FeedParser]
+** `application/atom+xml`
+** `application/rss+xml`
+* `org.apache.tika.parser.font.`
link:{tika-javadoc-url}/org/apache/tika/parser/font/AdobeFontMetricParser.html[AdobeFontMetricParser]
+** `application/x-font-adobe-metric`
+* `org.apache.tika.parser.font.`
link:{tika-javadoc-url}/org/apache/tika/parser/font/TrueTypeParser.html[TrueTypeParser]
+** `application/x-font-ttf`
+* `org.apache.tika.parser.geogebra.`
link:{tika-javadoc-url}/org/apache/tika/parser/geogebra/GeoGebraParser.html[GeoGebraParser]
+** `application/vnd.geogebra.file`
+** `application/vnd.geogebra.slides`
+** `application/vnd.geogebra.tool`
+* `org.apache.tika.parser.html.`
link:{tika-javadoc-url}/org/apache/tika/parser/html/JSoupParser.html[JSoupParser]
+** `application/vnd.wap.xhtml+xml`
+** `application/x-asp`
+** `application/xhtml+xml`
+** `text/html`
+* `org.apache.tika.parser.http.`
link:{tika-javadoc-url}/org/apache/tika/parser/http/HttpParser.html[HttpParser]
+** `application/x-httpresponse`
+* `org.apache.tika.parser.hwp.`
link:{tika-javadoc-url}/org/apache/tika/parser/hwp/HwpV5Parser.html[HwpV5Parser]
+** `application/x-hwp-v5`
+* `org.apache.tika.parser.image.`
link:{tika-javadoc-url}/org/apache/tika/parser/image/BPGParser.html[BPGParser]
+** `image/bpg`
+** `image/x-bpg`
+* `org.apache.tika.parser.image.`
link:{tika-javadoc-url}/org/apache/tika/parser/image/HeifParser.html[HeifParser]
+** `image/avif`
+** `image/heic`
+** `image/heic-sequence`
+** `image/heif`
+** `image/heif-sequence`
+* `org.apache.tika.parser.image.`
link:{tika-javadoc-url}/org/apache/tika/parser/image/ICNSParser.html[ICNSParser]
+** `image/icns`
+* `org.apache.tika.parser.image.`
link:{tika-javadoc-url}/org/apache/tika/parser/image/ImageParser.html[ImageParser]
+** `image/bmp`
+** `image/gif`
+** `image/jp2`
+** `image/jpx`
+** `image/png`
+** `image/vnd.wap.wbmp`
+** `image/x-icon`
+** `image/x-jbig2`
+** `image/x-ms-bmp`
+** `image/x-portable-pixmap`
+** `image/x-xcf`
+* `org.apache.tika.parser.image.`
link:{tika-javadoc-url}/org/apache/tika/parser/image/JXLParser.html[JXLParser]
+** `image/jxl`
+* `org.apache.tika.parser.image.`
link:{tika-javadoc-url}/org/apache/tika/parser/image/JpegParser.html[JpegParser]
+** `image/jpeg`
+* `org.apache.tika.parser.image.`
link:{tika-javadoc-url}/org/apache/tika/parser/image/PSDParser.html[PSDParser]
+** `image/vnd.adobe.photoshop`
+* `org.apache.tika.parser.image.`
link:{tika-javadoc-url}/org/apache/tika/parser/image/RawTiffParser.html[RawTiffParser]
+** `image/x-canon-cr2`
+** `image/x-raw-adobe`
+** `image/x-raw-nikon`
+** `image/x-raw-pentax`
+** `image/x-raw-samsung`
+** `image/x-raw-sony`
+* `org.apache.tika.parser.image.`
link:{tika-javadoc-url}/org/apache/tika/parser/image/TiffParser.html[TiffParser]
+** `image/tiff`
+* `org.apache.tika.parser.image.`
link:{tika-javadoc-url}/org/apache/tika/parser/image/WebPParser.html[WebPParser]
+** `image/webp`
+* `org.apache.tika.parser.indesign.`
link:{tika-javadoc-url}/org/apache/tika/parser/indesign/IDMLParser.html[IDMLParser]
+** `application/vnd.adobe.indesign-idml-package`
+* `org.apache.tika.parser.iptc.`
link:{tika-javadoc-url}/org/apache/tika/parser/iptc/IptcAnpaParser.html[IptcAnpaParser]
+** `text/vnd.iptc.anpa`
+* `org.apache.tika.parser.iwork.`
link:{tika-javadoc-url}/org/apache/tika/parser/iwork/IWorkPackageParser.html[IWorkPackageParser]
+** `application/vnd.apple.iwork`
+** `application/vnd.apple.keynote`
+** `application/vnd.apple.numbers`
+** `application/vnd.apple.pages`
+* `org.apache.tika.parser.iwork.iwana.`
link:{tika-javadoc-url}/org/apache/tika/parser/iwork/iwana/IWork13PackageParser.html[IWork13PackageParser]
+** `application/vnd.apple.keynote.13`
+** `application/vnd.apple.numbers.13`
+** `application/vnd.apple.pages.13`
+** `application/vnd.apple.unknown.13`
+* `org.apache.tika.parser.iwork.iwana.`
link:{tika-javadoc-url}/org/apache/tika/parser/iwork/iwana/IWork18PackageParser.html[IWork18PackageParser]
+** `application/vnd.apple.keynote.18`
+** `application/vnd.apple.numbers.18`
+** `application/vnd.apple.pages.18`
+* `org.apache.tika.parser.mail.`
link:{tika-javadoc-url}/org/apache/tika/parser/mail/RFC822Parser.html[RFC822Parser]
+** `message/rfc822`
+* `org.apache.tika.parser.markdown.`
link:{tika-javadoc-url}/org/apache/tika/parser/markdown/MarkdownParser.html[MarkdownParser]
+** `text/markdown`
+* `org.apache.tika.parser.mat.`
link:{tika-javadoc-url}/org/apache/tika/parser/mat/MatParser.html[MatParser]
+** `application/x-matlab-data`
+* `org.apache.tika.parser.mbox.`
link:{tika-javadoc-url}/org/apache/tika/parser/mbox/MboxParser.html[MboxParser]
+** `application/mbox`
+* `org.apache.tika.parser.microsoft.`
link:{tika-javadoc-url}/org/apache/tika/parser/microsoft/EMFParser.html[EMFParser]
+** `image/emf`
+* `org.apache.tika.parser.microsoft.`
link:{tika-javadoc-url}/org/apache/tika/parser/microsoft/JackcessParser.html[JackcessParser]
+** `application/x-msaccess`
+* `org.apache.tika.parser.microsoft.`
link:{tika-javadoc-url}/org/apache/tika/parser/microsoft/MSOwnerFileParser.html[MSOwnerFileParser]
+** `application/x-ms-owner`
+* `org.apache.tika.parser.microsoft.`
link:{tika-javadoc-url}/org/apache/tika/parser/microsoft/OfficeParser.html[OfficeParser]
+** `application/msword`
+** `application/sldworks`
+** `application/vnd.ms-excel`
+** `application/vnd.ms-outlook`
+** `application/vnd.ms-powerpoint`
+** `application/vnd.ms-project`
+** `application/vnd.visio`
+** `application/x-mspublisher`
+** `application/x-tika-msoffice`
+** `application/x-tika-msoffice-embedded; format=ole10_native`
+** `application/x-tika-msworks-spreadsheet`
+** `application/x-tika-ole-drm-encrypted`
+** `application/x-tika-ooxml-protected`
+* `org.apache.tika.parser.microsoft.`
link:{tika-javadoc-url}/org/apache/tika/parser/microsoft/OldExcelParser.html[OldExcelParser]
+** `application/vnd.ms-excel.sheet.2`
+** `application/vnd.ms-excel.sheet.3`
+** `application/vnd.ms-excel.sheet.4`
+** `application/vnd.ms-excel.workspace.3`
+** `application/vnd.ms-excel.workspace.4`
+* `org.apache.tika.parser.microsoft.`
link:{tika-javadoc-url}/org/apache/tika/parser/microsoft/TNEFParser.html[TNEFParser]
+** `application/ms-tnef`
+** `application/vnd.ms-tnef`
+** `application/x-tnef`
+* `org.apache.tika.parser.microsoft.`
link:{tika-javadoc-url}/org/apache/tika/parser/microsoft/WMFParser.html[WMFParser]
+** `image/wmf`
+* `org.apache.tika.parser.microsoft.activemime.`
link:{tika-javadoc-url}/org/apache/tika/parser/microsoft/activemime/ActiveMimeParser.html[ActiveMimeParser]
+** `application/x-activemime`
+* `org.apache.tika.parser.microsoft.chm.`
link:{tika-javadoc-url}/org/apache/tika/parser/microsoft/chm/ChmParser.html[ChmParser]
+** `application/chm`
+** `application/vnd.ms-htmlhelp`
+** `application/x-chm`
+* `org.apache.tika.parser.microsoft.onenote.`
link:{tika-javadoc-url}/org/apache/tika/parser/microsoft/onenote/OneNoteParser.html[OneNoteParser]
+** `application/onenote; format=one`
+* `org.apache.tika.parser.microsoft.ooxml.`
link:{tika-javadoc-url}/org/apache/tika/parser/microsoft/ooxml/OOXMLParser.html[OOXMLParser]
+** `application/vnd.ms-excel.addin.macroenabled.12`
+** `application/vnd.ms-excel.sheet.binary.macroenabled.12`
+** `application/vnd.ms-excel.sheet.macroenabled.12`
+** `application/vnd.ms-excel.template.macroenabled.12`
+** `application/vnd.ms-powerpoint.addin.macroenabled.12`
+** `application/vnd.ms-powerpoint.presentation.macroenabled.12`
+** `application/vnd.ms-powerpoint.slide.macroenabled.12`
+** `application/vnd.ms-powerpoint.slideshow.macroenabled.12`
+** `application/vnd.ms-powerpoint.template.macroenabled.12`
+** `application/vnd.ms-visio.drawing`
+** `application/vnd.ms-visio.drawing.macroenabled.12`
+** `application/vnd.ms-visio.stencil`
+** `application/vnd.ms-visio.stencil.macroenabled.12`
+** `application/vnd.ms-visio.template`
+** `application/vnd.ms-visio.template.macroenabled.12`
+** `application/vnd.ms-word.document.macroenabled.12`
+** `application/vnd.ms-word.template.macroenabled.12`
+** `application/vnd.ms-xpsdocument`
+** `application/vnd.openxmlformats-officedocument.presentationml.presentation`
+** `application/vnd.openxmlformats-officedocument.presentationml.slide`
+** `application/vnd.openxmlformats-officedocument.presentationml.slideshow`
+** `application/vnd.openxmlformats-officedocument.presentationml.template`
+** `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`
+** `application/vnd.openxmlformats-officedocument.spreadsheetml.template`
+** `application/vnd.openxmlformats-officedocument.wordprocessingml.document`
+** `application/vnd.openxmlformats-officedocument.wordprocessingml.template`
+** `model/vnd.dwfx+xps`
+* `org.apache.tika.parser.microsoft.ooxml.xwpf.ml2006.`
link:{tika-javadoc-url}/org/apache/tika/parser/microsoft/ooxml/xwpf/ml2006/Word2006MLParser.html[Word2006MLParser]
+** `application/vnd.ms-word2006ml`
+* `org.apache.tika.parser.microsoft.pst.`
link:{tika-javadoc-url}/org/apache/tika/parser/microsoft/pst/OutlookPSTParser.html[OutlookPSTParser]
+** `application/vnd.ms-outlook-pst`
+* `org.apache.tika.parser.microsoft.pst.`
link:{tika-javadoc-url}/org/apache/tika/parser/microsoft/pst/PSTMailItemParser.html[PSTMailItemParser]
+** `application/x-tika-pst-mail-item`
+* `org.apache.tika.parser.microsoft.rtf.`
link:{tika-javadoc-url}/org/apache/tika/parser/microsoft/rtf/RTFParser.html[RTFParser]
+** `application/rtf`
+* `org.apache.tika.parser.microsoft.xml.`
link:{tika-javadoc-url}/org/apache/tika/parser/microsoft/xml/SpreadsheetMLParser.html[SpreadsheetMLParser]
+** `application/vnd.ms-spreadsheetml`
+* `org.apache.tika.parser.microsoft.xml.`
link:{tika-javadoc-url}/org/apache/tika/parser/microsoft/xml/WordMLParser.html[WordMLParser]
+** `application/vnd.ms-wordml`
+* `org.apache.tika.parser.mif.`
link:{tika-javadoc-url}/org/apache/tika/parser/mif/MIFParser.html[MIFParser]
+** `application/vnd.mif`
+** `application/x-maker`
+** `application/x-mif`
+* `org.apache.tika.parser.mp3.`
link:{tika-javadoc-url}/org/apache/tika/parser/mp3/Mp3Parser.html[Mp3Parser]
+** `audio/mpeg`
+* `org.apache.tika.parser.mp4.`
link:{tika-javadoc-url}/org/apache/tika/parser/mp4/MP4Parser.html[MP4Parser]
+** `application/mp4`
+** `audio/mp4`
+** `video/3gpp`
+** `video/3gpp2`
+** `video/mp4`
+** `video/quicktime`
+** `video/x-m4v`
+* `org.apache.tika.parser.odf.`
link:{tika-javadoc-url}/org/apache/tika/parser/odf/FlatOpenDocumentParser.html[FlatOpenDocumentParser]
+** `application/vnd.oasis.opendocument.flat.presentation`
+** `application/vnd.oasis.opendocument.flat.spreadsheet`
+** `application/vnd.oasis.opendocument.flat.text`
+** `application/vnd.oasis.opendocument.tika.flat.document`
+* `org.apache.tika.parser.odf.`
link:{tika-javadoc-url}/org/apache/tika/parser/odf/OpenDocumentParser.html[OpenDocumentParser]
+** `application/vnd.oasis.opendocument.chart`
+** `application/vnd.oasis.opendocument.chart-template`
+** `application/vnd.oasis.opendocument.formula`
+** `application/vnd.oasis.opendocument.formula-template`
+** `application/vnd.oasis.opendocument.graphics`
+** `application/vnd.oasis.opendocument.graphics-template`
+** `application/vnd.oasis.opendocument.image`
+** `application/vnd.oasis.opendocument.image-template`
+** `application/vnd.oasis.opendocument.presentation`
+** `application/vnd.oasis.opendocument.presentation-template`
+** `application/vnd.oasis.opendocument.spreadsheet`
+** `application/vnd.oasis.opendocument.spreadsheet-template`
+** `application/vnd.oasis.opendocument.text`
+** `application/vnd.oasis.opendocument.text-master`
+** `application/vnd.oasis.opendocument.text-template`
+** `application/vnd.oasis.opendocument.text-web`
+** `application/vnd.sun.xml.writer`
+** `application/x-vnd.oasis.opendocument.chart`
+** `application/x-vnd.oasis.opendocument.chart-template`
+** `application/x-vnd.oasis.opendocument.formula`
+** `application/x-vnd.oasis.opendocument.formula-template`
+** `application/x-vnd.oasis.opendocument.graphics`
+** `application/x-vnd.oasis.opendocument.graphics-template`
+** `application/x-vnd.oasis.opendocument.image`
+** `application/x-vnd.oasis.opendocument.image-template`
+** `application/x-vnd.oasis.opendocument.presentation`
+** `application/x-vnd.oasis.opendocument.presentation-template`
+** `application/x-vnd.oasis.opendocument.spreadsheet`
+** `application/x-vnd.oasis.opendocument.spreadsheet-template`
+** `application/x-vnd.oasis.opendocument.text`
+** `application/x-vnd.oasis.opendocument.text-master`
+** `application/x-vnd.oasis.opendocument.text-template`
+** `application/x-vnd.oasis.opendocument.text-web`
+* `org.apache.tika.parser.ogg.`
link:{tika-javadoc-url}/org/apache/tika/parser/ogg/FlacParser.html[FlacParser]
+** `audio/x-flac`
+** `audio/x-oggflac`
+* `org.apache.tika.parser.ogg.`
link:{tika-javadoc-url}/org/apache/tika/parser/ogg/OggParser.html[OggParser]
+** `application/kate`
+** `application/ogg`
+** `audio/ogg`
+** `audio/x-oggpcm`
+** `video/daala`
+** `video/ogg`
+** `video/x-dirac`
+** `video/x-oggrgb`
+** `video/x-ogguvs`
+** `video/x-oggyuv`
+** `video/x-ogm`
+* `org.apache.tika.parser.ogg.`
link:{tika-javadoc-url}/org/apache/tika/parser/ogg/OpusParser.html[OpusParser]
+** `audio/ogg; codecs=opus`
+** `audio/opus`
+* `org.apache.tika.parser.ogg.`
link:{tika-javadoc-url}/org/apache/tika/parser/ogg/SpeexParser.html[SpeexParser]
+** `audio/ogg; codecs=speex`
+** `audio/speex`
+* `org.apache.tika.parser.ogg.`
link:{tika-javadoc-url}/org/apache/tika/parser/ogg/TheoraParser.html[TheoraParser]
+** `video/theora`
+* `org.apache.tika.parser.ogg.`
link:{tika-javadoc-url}/org/apache/tika/parser/ogg/VorbisParser.html[VorbisParser]
+** `audio/vorbis`
+* `org.apache.tika.parser.pdf.`
link:{tika-javadoc-url}/org/apache/tika/parser/pdf/PDFParser.html[PDFParser]
+** `application/pdf`
+* `org.apache.tika.parser.pkg.`
link:{tika-javadoc-url}/org/apache/tika/parser/pkg/CompressorParser.html[CompressorParser]
+** `application/deflate64`
+** `application/gzip`
+** `application/x-brotli`
+** `application/x-bzip`
+** `application/x-bzip2`
+** `application/x-compress`
+** `application/x-gzip`
+** `application/x-java-pack200`
+** `application/x-lz4`
+** `application/x-lzma`
+** `application/x-snappy`
+** `application/x-xz`
+** `application/zlib`
+* `org.apache.tika.parser.pkg.`
link:{tika-javadoc-url}/org/apache/tika/parser/pkg/PackageParser.html[PackageParser]
+** `application/x-archive`
+** `application/x-arj`
+** `application/x-cpio`
+** `application/x-tar`
+** `application/x-tika-unix-dump`
+* `org.apache.tika.parser.pkg.`
link:{tika-javadoc-url}/org/apache/tika/parser/pkg/RarParser.html[RarParser]
+** `application/x-rar-compressed`
+* `org.apache.tika.parser.pkg.`
link:{tika-javadoc-url}/org/apache/tika/parser/pkg/SevenZParser.html[SevenZParser]
+** `application/x-7z-compressed`
+* `org.apache.tika.parser.pkg.`
link:{tika-javadoc-url}/org/apache/tika/parser/pkg/ZipParser.html[ZipParser]
+** `application/java-archive`
+** `application/zip`
+* `org.apache.tika.parser.prt.`
link:{tika-javadoc-url}/org/apache/tika/parser/prt/PRTParser.html[PRTParser]
+** `application/x-prt`
+* `org.apache.tika.parser.sas.`
link:{tika-javadoc-url}/org/apache/tika/parser/sas/SAS7BDATParser.html[SAS7BDATParser]
+** `application/x-sas-data`
+* `org.apache.tika.parser.tmx.`
link:{tika-javadoc-url}/org/apache/tika/parser/tmx/TMXParser.html[TMXParser]
+** `application/x-tmx`
+* `org.apache.tika.parser.video.`
link:{tika-javadoc-url}/org/apache/tika/parser/video/FLVParser.html[FLVParser]
+** `video/x-flv`
+* `org.apache.tika.parser.wacz.`
link:{tika-javadoc-url}/org/apache/tika/parser/wacz/WACZParser.html[WACZParser]
+** `application/x-wacz`
+* `org.apache.tika.parser.warc.`
link:{tika-javadoc-url}/org/apache/tika/parser/warc/WARCParser.html[WARCParser]
+** `application/arc+gz`
+** `application/warc`
+** `application/warc+gz`
+** `application/x-internet-archive`
+* `org.apache.tika.parser.wordperfect.`
link:{tika-javadoc-url}/org/apache/tika/parser/wordperfect/QuattroProParser.html[QuattroProParser]
+** `application/x-quattro-pro; version=9`
+* `org.apache.tika.parser.wordperfect.`
link:{tika-javadoc-url}/org/apache/tika/parser/wordperfect/WordPerfectParser.html[WordPerfectParser]
+** `application/vnd.wordperfect; version=5.0`
+** `application/vnd.wordperfect; version=5.1`
+** `application/vnd.wordperfect; version=6.x`
+* `org.apache.tika.parser.xliff.`
link:{tika-javadoc-url}/org/apache/tika/parser/xliff/XLIFF12Parser.html[XLIFF12Parser]
+** `application/x-xliff+xml`
+* `org.apache.tika.parser.xliff.`
link:{tika-javadoc-url}/org/apache/tika/parser/xliff/XLZParser.html[XLZParser]
+** `application/x-xliff+zip`
+* `org.apache.tika.parser.xml.`
link:{tika-javadoc-url}/org/apache/tika/parser/xml/DcXMLParser.html[DcXMLParser]
+** `application/xml`
+** `image/svg+xml`
+* `org.apache.tika.parser.xml.`
link:{tika-javadoc-url}/org/apache/tika/parser/xml/FictionBookParser.html[FictionBookParser]
+** `application/x-fictionbook+xml`
diff --git
a/tika-app/src/main/java/org/apache/tika/cli/SupportedFormatsAdoc.java
b/tika-app/src/main/java/org/apache/tika/cli/SupportedFormatsAdoc.java
new file mode 100644
index 0000000000..53b75c1abb
--- /dev/null
+++ b/tika-app/src/main/java/org/apache/tika/cli/SupportedFormatsAdoc.java
@@ -0,0 +1,105 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.tika.cli;
+
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeMap;
+import java.util.TreeSet;
+
+import org.apache.tika.mime.MediaType;
+import org.apache.tika.parser.CompositeParser;
+import org.apache.tika.parser.ParseContext;
+import org.apache.tika.parser.Parser;
+import org.apache.tika.parser.ParserDecorator;
+import org.apache.tika.parser.ocr.TesseractOCRConfig;
+
+/**
+ * Renders the leaf parsers of a composite and their media types as an AsciiDoc
+ * list for the docs' Supported Formats page. Output is fully sorted so a
+ * checked-in copy can be diffed against a fresh render.
+ */
+final class SupportedFormatsAdoc {
+
+ static final String HEADER = "//\n" +
+ "// Licensed to the Apache Software Foundation (ASF) under one or
more\n" +
+ "// contributor license agreements. See the NOTICE file
distributed with\n" +
+ "// this work for additional information regarding copyright
ownership.\n" +
+ "// The ASF licenses this file to You under the Apache License,
Version 2.0\n" +
+ "// (the \"License\"); you may not use this file except in
compliance with\n" +
+ "// the License. You may obtain a copy of the License at\n" +
+ "//\n" +
+ "// http://www.apache.org/licenses/LICENSE-2.0\n" +
+ "//\n" +
+ "// Unless required by applicable law or agreed to in writing,
software\n" +
+ "// distributed under the License is distributed on an \"AS IS\"
BASIS,\n" +
+ "// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
or implied.\n" +
+ "// See the License for the specific language governing
permissions and\n" +
+ "// limitations under the License.\n" +
+ "//\n" +
+ "\n" +
+ "// Generated by `tika-app --list-parser-details-adoc`. Do not
edit by hand;\n" +
+ "// regenerate and commit. TikaCLITest fails when this file is
stale.\n";
+
+ private SupportedFormatsAdoc() {
+ }
+
+ static String render(Parser root) {
+ // Tesseract only advertises types when the binary is installed; hide
it so
+ // the output does not depend on the generating machine.
+ ParseContext context = new ParseContext();
+ TesseractOCRConfig noOcr = new TesseractOCRConfig();
+ noOcr.setSkipOcr(true);
+ context.set(TesseractOCRConfig.class, noOcr);
+
+ Map<String, Set<String>> byClass = new TreeMap<>();
+ collect(root, context, byClass);
+
+ StringBuilder sb = new StringBuilder(HEADER).append('\n');
+ for (Map.Entry<String, Set<String>> e : byClass.entrySet()) {
+ String fqn = e.getKey();
+ int dot = fqn.lastIndexOf('.');
+ sb.append("* `").append(fqn, 0, dot + 1).append("`
link:{tika-javadoc-url}/")
+ .append(fqn.replace('.',
'/')).append(".html[").append(fqn.substring(dot + 1))
+ .append("]\n");
+ for (String type : e.getValue()) {
+ sb.append("** `").append(type).append("`\n");
+ }
+ }
+ return sb.toString();
+ }
+
+ private static void collect(Parser p, ParseContext context, Map<String,
Set<String>> byClass) {
+ while (p instanceof ParserDecorator) {
+ p = ((ParserDecorator) p).getWrappedParser();
+ }
+ if (p instanceof CompositeParser) {
+ for (Parser child : ((CompositeParser)
p).getAllComponentParsers()) {
+ collect(child, context, byClass);
+ }
+ return;
+ }
+ Set<MediaType> supported = p.getSupportedTypes(context);
+ if (supported.isEmpty()) {
+ return;
+ }
+ Set<String> types = byClass.computeIfAbsent(p.getClass().getName(), k
-> new TreeSet<>());
+ for (MediaType mt : supported) {
+ types.add(mt.toString());
+ }
+ }
+}
diff --git a/tika-app/src/main/java/org/apache/tika/cli/TikaCLI.java
b/tika-app/src/main/java/org/apache/tika/cli/TikaCLI.java
index e6ba42a9d4..0a8284ff16 100644
--- a/tika-app/src/main/java/org/apache/tika/cli/TikaCLI.java
+++ b/tika-app/src/main/java/org/apache/tika/cli/TikaCLI.java
@@ -525,6 +525,10 @@ public class TikaCLI {
} else if (arg.equals("--list-parser-detail-apt") ||
arg.equals("--list-parser-details-apt")) {
pipeMode = false;
displayParsers(true, true);
+ } else if (arg.equals("--list-parser-detail-adoc") ||
arg.equals("--list-parser-details-adoc")) {
+ pipeMode = false;
+ configure();
+ System.out.print(SupportedFormatsAdoc.render(parser));
} else if (arg.equals("--list-met-models")) {
pipeMode = false;
displayMetModels();
@@ -932,6 +936,8 @@ public class TikaCLI {
out.println(" List the available document parsers and their
supported mime types");
out.println(" --list-parser-details-apt");
out.println(" List the available document parsers and their
supported mime types in apt format.");
+ out.println(" --list-parser-details-adoc");
+ out.println(" Same, in AsciiDoc; regenerates
docs/modules/ROOT/partials/supported-formats.adoc");
out.println(" --list-detectors");
out.println(" List the available document detectors");
out.println(" --list-detector-names");
diff --git a/tika-app/src/test/java/org/apache/tika/cli/TikaCLITest.java
b/tika-app/src/test/java/org/apache/tika/cli/TikaCLITest.java
index d880d89617..90dd6ab5c8 100644
--- a/tika-app/src/test/java/org/apache/tika/cli/TikaCLITest.java
+++ b/tika-app/src/test/java/org/apache/tika/cli/TikaCLITest.java
@@ -22,6 +22,7 @@ import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assumptions.assumeTrue;
import java.io.ByteArrayOutputStream;
import java.io.File;
@@ -808,6 +809,32 @@ public class TikaCLITest {
assertTrue(content.contains("application/vnd.oasis.opendocument.text-web"));
}
+ @Test
+ public void testListParserDetailAdoc() throws Exception {
+ String content = getParamOutContent("--list-parser-details-adoc");
+ assertTrue(content.startsWith(SupportedFormatsAdoc.HEADER));
+ assertTrue(content.contains(
+
"link:{tika-javadoc-url}/org/apache/tika/parser/pdf/PDFParser.html[PDFParser]"));
+ assertTrue(content.contains("**
`application/vnd.oasis.opendocument.text-web`"));
+ // Tesseract is hidden so the listing is the same with or without the
binary.
+ assertFalse(content.contains("TesseractOCRParser"));
+ }
+
+ /**
+ * The docs' Supported Formats page includes a checked-in copy of the adoc
+ * listing. Fail when it drifts from the parsers actually on the classpath.
+ */
+ @Test
+ public void testSupportedFormatsPartialIsCurrent() throws Exception {
+ Path partial = Paths.get("..", "docs", "modules", "ROOT", "partials",
"supported-formats.adoc");
+ assumeTrue(Files.isRegularFile(partial), "docs partial not present in
this checkout");
+ String expected =
getParamOutContent("--list-parser-details-adoc").replace("\r\n", "\n");
+ String actual = Files.readString(partial, UTF_8).replace("\r\n", "\n");
+ assertEquals(expected, actual,
"docs/modules/ROOT/partials/supported-formats.adoc is stale; regenerate
with:\n" +
+ " java -jar tika-app/target/tika-app-<version>.jar
--list-parser-details-adoc " +
+ "> docs/modules/ROOT/partials/supported-formats.adoc");
+ }
+
/**
* Tests --convert-config-xml-to-json with no separate config file.
* Regression test for TIKA-4734: the flag used to be misrouted to async