Skip to main content

Convert documents (doc, docx, odt, rtf, epub, pdf, presentations, spreadsheets, csv) to GitHub-Flavored Markdown

Project description

firecrawl-anydoc

Convert documents to GitHub-Flavored Markdown. Python bindings for the anydoc Rust crate. A Firecrawl project.

pip install firecrawl-anydoc

The package installs as firecrawl-anydoc and imports as anydoc.

Format Extensions
Word .doc, .docx, .docm
PowerPoint .ppt, .pps, .pot, .pptx, .pptm, .ppsx, .ppsm
Excel .xls, .xlsx, .xlsm, .xlsb
OpenDocument .odt, .ods, .odp
Rich Text Format .rtf
EPUB .epub
CSV .csv
PDF .pdf

Usage

import anydoc

# From a file path:
markdown = anydoc.to_markdown("report.docx")

# From bytes, with the format detected from the content:
markdown = anydoc.to_markdown_bytes(data)

# Or name it, which signature-less formats (CSV) need:
markdown = anydoc.to_markdown_bytes(data, "csv")

# Or stop at the document model, which also carries embedded assets:
document = anydoc.to_document(data)

Conversion releases the GIL, so other threads keep running. Type stubs ship with the package.

Format detection

The format is read from the file content: the signature and identity each container specification designates (PDF header, RTF open group, OLE stream names, ZIP package mimetype and content types). Signature-less formats like CSV have no such marker, so detection returns None for them and the extension, or an explicit format, names them instead.

anydoc.format_from_bytes(data)  # 'docx', or None when nothing matches
anydoc.format_from_extension(".pptm")  # 'pptx'
anydoc.format_from_path("report.odt")  # 'odt'

Images and embedded objects

Markdown cannot embed bytes, so an embedded image renders as its alt text while the bytes stay on document.assets, tagged with a media type and the part they came from. Images that carry an external URL render as ordinary Markdown images.

The full format and behavior notes live in the repository README.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

firecrawl_anydoc-0.1.1.tar.gz (181.3 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

firecrawl_anydoc-0.1.1-cp310-abi3-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.10+Windows x86-64

firecrawl_anydoc-0.1.1-cp310-abi3-musllinux_1_2_x86_64.whl (3.8 MB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ x86-64

firecrawl_anydoc-0.1.1-cp310-abi3-musllinux_1_2_aarch64.whl (3.6 MB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ ARM64

firecrawl_anydoc-0.1.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.6 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ x86-64

firecrawl_anydoc-0.1.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (3.4 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ARM64

firecrawl_anydoc-0.1.1-cp310-abi3-macosx_11_0_arm64.whl (3.3 MB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

firecrawl_anydoc-0.1.1-cp310-abi3-macosx_10_13_x86_64.whl (3.5 MB view details)

Uploaded CPython 3.10+macOS 10.13+ x86-64

File details

Details for the file firecrawl_anydoc-0.1.1.tar.gz.

File metadata

  • Download URL: firecrawl_anydoc-0.1.1.tar.gz
  • Upload date:
  • Size: 181.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for firecrawl_anydoc-0.1.1.tar.gz
Algorithm Hash digest
SHA256 2657c3d3d4cb427346c3adf8795dd60e19c366c1065b26532cb6baf8759b89ff
MD5 ce26c638c68cf1c99c6acdbd0754209d
BLAKE2b-256 2cf178ff211458a90f14bfa9558054874c38b176b91cbecb9cff24e45bca6dd1

See more details on using hashes here.

Provenance

The following attestation bundles were made for firecrawl_anydoc-0.1.1.tar.gz:

Publisher: release.yml on firecrawl/anydoc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file firecrawl_anydoc-0.1.1-cp310-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for firecrawl_anydoc-0.1.1-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 879486aa770e67ecc0ac4dfc9c8819d8ee9afa7c37ba5b9bdf67f62b470889b3
MD5 f332b0aa06417fbd253101b5ecaba779
BLAKE2b-256 952dd65c5275e35b12fe7f1ba020cd146298448e2f59b49a17c70913a22f12d8

See more details on using hashes here.

Provenance

The following attestation bundles were made for firecrawl_anydoc-0.1.1-cp310-abi3-win_amd64.whl:

Publisher: release.yml on firecrawl/anydoc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file firecrawl_anydoc-0.1.1-cp310-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for firecrawl_anydoc-0.1.1-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 c1fab63bd17bef2ac8681830c9c5e12a5e6fbc21193a46d4b176f7d0e96602f6
MD5 10f25ebc349f1a6fccff3ac83ea5b1f5
BLAKE2b-256 1ef08d6827ac6b5fcd6d9d41c7055cdf6df8ba48a03c60370de4f628efbccafa

See more details on using hashes here.

Provenance

The following attestation bundles were made for firecrawl_anydoc-0.1.1-cp310-abi3-musllinux_1_2_x86_64.whl:

Publisher: release.yml on firecrawl/anydoc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file firecrawl_anydoc-0.1.1-cp310-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for firecrawl_anydoc-0.1.1-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 6a5f3c0e0685c47a74818f39b43315877595d387b2fabb17d87c08fc300b100a
MD5 90ed2757745167837331b877b1b05d93
BLAKE2b-256 89302f268b2c9b9286e4fb43605930532205acc1ece08c3e214682fc8b77d791

See more details on using hashes here.

Provenance

The following attestation bundles were made for firecrawl_anydoc-0.1.1-cp310-abi3-musllinux_1_2_aarch64.whl:

Publisher: release.yml on firecrawl/anydoc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file firecrawl_anydoc-0.1.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for firecrawl_anydoc-0.1.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bf8212dba02b9277cf28da3114cac4d14667b53a82c79b7e171174aed110a18c
MD5 73003c9ef872d48244640116bf721f21
BLAKE2b-256 b3cbd79e6168e07c0e9b864d6ec5cbba7dcaa83e22afe978c50c862fb6a3c317

See more details on using hashes here.

Provenance

The following attestation bundles were made for firecrawl_anydoc-0.1.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on firecrawl/anydoc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file firecrawl_anydoc-0.1.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for firecrawl_anydoc-0.1.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 dbcb4f6f675d9fa5f8ef7360643c3ec189be59db6f0a50b64df9ea3cb2baba93
MD5 837b673abc5a4873779cff7cfcc11d27
BLAKE2b-256 83eb4fcf81f2edb1bc85312480ada3829eca3aa538c7d36a1fa7d5eaccd81095

See more details on using hashes here.

Provenance

The following attestation bundles were made for firecrawl_anydoc-0.1.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release.yml on firecrawl/anydoc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file firecrawl_anydoc-0.1.1-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for firecrawl_anydoc-0.1.1-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ae22b699c6d59d1bdf09f537b845f68f42d688012f1464d6ee0ad1d56c7ed5ec
MD5 812985724e002a641f7255d97b756413
BLAKE2b-256 6ce651f4dfb01e2310ce5865711dd55ec9f06ced53c5623b08057d131dde1abb

See more details on using hashes here.

Provenance

The following attestation bundles were made for firecrawl_anydoc-0.1.1-cp310-abi3-macosx_11_0_arm64.whl:

Publisher: release.yml on firecrawl/anydoc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file firecrawl_anydoc-0.1.1-cp310-abi3-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for firecrawl_anydoc-0.1.1-cp310-abi3-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 ef8f85058952f83e485d082161cc24c2dbde0d5db6c610c5b3c4daf703f03d29
MD5 0709275a3af53cbc84347efed1fae57d
BLAKE2b-256 045b97f072fd05549fa6a064b6f09d619a1a74ff573e4fe35a8dc24c302a8b7f

See more details on using hashes here.

Provenance

The following attestation bundles were made for firecrawl_anydoc-0.1.1-cp310-abi3-macosx_10_13_x86_64.whl:

Publisher: release.yml on firecrawl/anydoc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page