Skip to main content

PlainTextConverter

Converts plain text files, JSON, and Markdown to Markdown (passthrough with encoding detection).

Accepted Formats

  • MIME Types: text/*, application/json, application/markdown
  • Extensions: .txt, .text, .md, .markdown, .json, .jsonl

Features

  • Automatic character encoding detection using charset_normalizer
  • Respects stream_info.charset if provided
  • Handles files with any charset (UTF-8, Latin-1, etc.)

Example

Source

_plain_text_converter.py:33

CsvConverter

Converts CSV files to Markdown tables.

Accepted Formats

  • MIME Types: text/csv, application/csv
  • Extensions: .csv

Features

  • First row treated as header
  • Automatic column alignment
  • Handles missing cells
  • Character encoding detection

Example

Input CSV:
Output:

Source

_csv_converter.py:15

IpynbConverter

Converts Jupyter Notebook (.ipynb) files to Markdown.

Accepted Formats

  • MIME Types: application/json (if contains nbformat)
  • Extensions: .ipynb

Features

  • Markdown cells preserved as-is
  • Code cells wrapped in ```python blocks
  • Raw cells wrapped in ``` blocks
  • Extracts title from first H1 heading or notebook metadata

Example

Output:

Results

The analysis shows…
Requires: MarkItDown instance to process extracted files

Features

  • Recursively converts all files in archive
  • Each file presented under ## File: path/to/file.ext heading
  • Unsupported files silently skipped
  • Maintains directory structure in headings

Example

Output:

Source

_zip_converter.py:22

EpubConverter

Converts EPUB ebooks to Markdown, preserving chapter structure and metadata.

Accepted Formats

  • MIME Types: application/epub, application/epub+zip, application/x-epub+zip
  • Extensions: .epub

Features

  • Extracts metadata (title, authors, publisher, description, etc.)
  • Converts chapters in spine order
  • Preserves chapter structure
  • Extends HtmlConverter for content conversion

Example

Output:

Source

_epub_converter.py:26

RssConverter

Converts RSS and Atom feeds to Markdown.

Accepted Formats

  • MIME Types: application/rss+xml, application/atom+xml, text/xml, application/xml
  • Extensions: .rss, .atom, .xml

Features

  • Supports RSS 2.0 and Atom formats
  • Extracts feed title, description, and items
  • HTML content in descriptions converted to Markdown
  • Preserves publication dates

Example

Output:

Source

_rss_converter.py:29

WikipediaConverter

Specialized converter for Wikipedia pages, extracting main article content.

Accepted Formats

  • MIME Types: text/html, application/xhtml
  • Extensions: .html, .htm
  • URL Pattern: https://*.wikipedia.org/*

Features

  • Extracts only main content (#mw-content-text)
  • Removes navigation, sidebars, and footer
  • Preserves article title
  • Extends HtmlConverter

Example

Source

_wikipedia_converter.py:20

YouTubeConverter

Extracts YouTube video metadata, description, and transcript.

Accepted Formats

  • URL Pattern: https://www.youtube.com/watch?v=*
  • MIME Types: text/html, application/xhtml

Dependencies

Optional: youtube-transcript-api for transcripts

Features

  • Extracts video title, views, keywords, runtime
  • Retrieves description from page metadata
  • Downloads transcript (if available)
  • Supports multiple languages

Parameters

list
Languages to try for transcript (e.g., ["en", "es"]). Defaults to detected languages.

Example

Output:

Source

_youtube_converter.py:37

BingSerpConverter

Extracts organic search results from Bing search results pages.

Accepted Formats

  • URL Pattern: https://www.bing.com/search?q=*
  • MIME Types: text/html, application/xhtml

Features

  • Extracts search query
  • Parses organic results (.b_algo class)
  • Decodes redirect URLs
  • Converts HTML descriptions to Markdown

Example

Output:

Source

_bing_serp_converter.py:23

OutlookMsgConverter

Converts Outlook .msg email files to Markdown.

Dependencies

Requires: olefile

Accepted Formats

  • MIME Types: application/vnd.ms-outlook
  • Extensions: .msg

Features

  • Extracts email headers (From, To, Subject)
  • Retrieves email body content
  • Handles text encoding (UTF-16, UTF-8)

Example

Output:

Source

_outlook_msg_converter.py:24

DocumentIntelligenceConverter

Uses Azure Document Intelligence (formerly Form Recognizer) for advanced OCR and document understanding.

Dependencies

Requires: azure-ai-documentintelligence, azure-identity

Accepted Formats

  • DOCX, PPTX, XLSX (without OCR)
  • PDF, JPEG, PNG, BMP, TIFF (with OCR)
  • HTML

Constructor

Parameters:
str
required
Azure Document Intelligence endpoint URL
str
default:"2024-07-31-preview"
API version to use
AzureKeyCredential | TokenCredential
Authentication credential. Defaults to DefaultAzureCredential() or AZURE_API_KEY env var.
list
File types to accept. Values from DocumentIntelligenceFileType enum.

Features

  • Advanced OCR with high resolution support
  • Formula extraction from documents
  • Font style detection
  • Layout analysis
  • Native Markdown output

Example

File Types

Analysis Features

For OCR-supported formats (PDF, images):
  • FORMULAS - Extract mathematical formulas
  • OCR_HIGH_RESOLUTION - High-quality OCR
  • STYLE_FONT - Font style information

Source

_doc_intel_converter.py:130

Authentication

Supports multiple authentication methods:
  1. API Key (via AzureKeyCredential)
  2. Environment Variable (AZURE_API_KEY)
  3. Managed Identity (via DefaultAzureCredential)