Feature request: Support for HTML / MHTML files (e.g. Jira exports)
Problem
Jira exports issues as standalone HTML files wrapped with Content-Type: application/vnd.ms-word, often saved with a .doc extension. These files are plain HTML documents (not OLE2 compound binaries), and anydoc currently rejects them as malformed:
malformed document: not an OLE2 compound file: Invalid CFB file (wrong magic number): [3c, 21, 44, 4f, 43, 54, 59, 50]The magic bytes 3c 21 44 4f 43 54 59 50 = <!DOCTYPE -- it is a valid HTML file.
Use case
Many enterprise tools (Jira, Confluence, SharePoint) export content as HTML or MHTML (.mht, .mhtml) files. Being able to convert these to Markdown via anydoc would be valuable for document pipelines that ingest exports from these tools.
Proposed solution
Add support for standalone HTML files as an input format. The EPUB parser already handles HTML internally, so much of the parsing logic may be reusable.
At minimum, recognizing the <!DOCTYPE html> header (or <html> root element) and routing through the existing HTML-to-model pipeline would cover the Jira export case. Full MHTML (multipart MIME with embedded resources like images) support would be a bonus.
Example file
Source: firecrawl/anydoc