Parsers

Parsers convert documents from various formats into the all2md AST (Abstract Syntax Tree). Each parser implements the BaseParser interface and accepts format-specific options.

Core Formats

The most commonly used document formats with full-featured parsing support:

Format

Module

Description

PDF

all2md.parsers.pdf

Advanced PDF parsing with table detection using PyMuPDF

DOCX

all2md.parsers.docx

Microsoft Word with formatting preservation

HTML

all2md.parsers.html

HTML/XHTML with configurable conversion

PPTX

all2md.parsers.pptx

PowerPoint slide-by-slide extraction

EML

all2md.parsers.eml

Email with chain detection and attachments

Data Formats

Structured data and spreadsheet formats:

Format

Module

Description

XLSX

all2md.parsers.xlsx

Excel workbooks with sheet selection

CSV

all2md.parsers.csv

Comma-separated values with dialect detection

JSON

all2md.parsers.json

JSON documents with pretty-printing

YAML

all2md.parsers.yaml

YAML configuration files

TOML

all2md.parsers.toml

TOML configuration files

INI

all2md.parsers.ini

INI configuration files

Markup Formats

Text markup languages with semantic conversion:

Format

Module

Description

Markdown

all2md.parsers.markdown

Markdown parsing (for round-trip transformations)

RST

all2md.parsers.rst

reStructuredText documents

LaTeX

all2md.parsers.latex

LaTeX documents with math support

AsciiDoc

all2md.parsers.asciidoc

AsciiDoc documents

Org-Mode

all2md.parsers.org

Emacs Org-Mode files

MediaWiki

all2md.parsers.mediawiki

MediaWiki/Wikipedia markup

Textile

all2md.parsers.textile

Textile markup

DokuWiki

all2md.parsers.dokuwiki

DokuWiki syntax

E-book & Document Formats

Long-form document and e-book formats:

Format

Module

Description

EPUB

all2md.parsers.epub

E-book format with chapter extraction

ODT

all2md.parsers.odt

OpenDocument Text

ODP

all2md.parsers.odp

OpenDocument Presentation

RTF

all2md.parsers.rtf

Rich Text Format

FB2

all2md.parsers.fb2

FictionBook e-book format

CHM

all2md.parsers.chm

Microsoft Compiled HTML Help

Archive & Web Formats

Archives, web captures, and specialized formats:

Format

Module

Description

ZIP/Archive

all2md.parsers.archive

ZIP, TAR, 7z, RAR archives

MHTML

all2md.parsers.mhtml

MIME HTML web archives

WebArchive

all2md.parsers.webarchive

Safari web archives

MBOX

all2md.parsers.mbox

Mailbox files

ENEX

all2md.parsers.enex

Evernote export format

OpenAPI

all2md.parsers.openapi

OpenAPI/Swagger specifications

Jupyter

all2md.parsers.ipynb

Jupyter notebooks

Other Formats

Additional supported formats:

Format

Module

Description

Plain Text

all2md.parsers.plaintext

Plain text files

Source Code

all2md.parsers.sourcecode

100+ source-code and config file extensions

BBCode

all2md.parsers.bbcode

Forum BBCode markup

Outlook

all2md.parsers.outlook

Microsoft Outlook MSG files

Base Parser Class

All parsers inherit from the base parser class:

all2md.parsers.base.BaseParser

Abstract base class for all document parsers.

Complete Parser Reference

For detailed documentation on all parser modules, see: