Install
Prerequisites: python3.10
Install Dependencies
linux/osx
apt-get/yum/brew install libreoffice
windows
install libreoffice
append "install_dir\LibreOffice\program" to ENVIRONMENT PATH
Install Magic-Doc
pip install fairy-doc[cpu] # cpu version
or
pip install fairy-doc[gpu] # gpu version
Introduction
Magic-Doc is a lightweight open-source tool that allows users to convert multiple file type (PPT/PPTX/DOC/DOCX/PDF) to markdown. It supports both local file and S3 file.
Example
# for local file
from magic_doc.docconv import DocConverter, S3Config
converter = DocConverter(s3_config=None)
markdown_content, time_cost = converter.convert("some_doc.pptx", conv_timeout=300)
# for remote file located in aws s3
from magic_doc.docconv import DocConverter, S3Config
s3_config = S3Config(ak='${ak}', sk='${sk}', endpoint='${endpoint}')
converter = DocConverter(s3_config=s3_config)
markdown_content, time_cost = converter.convert("s3://some_bucket/some_doc.pptx", conv_timeout=300)
Performance
ENV: AMD EPYC 7742 64-Core Processor, NVIDIA A100, Centos 7
| File Type | Speed |
|---|---|
| PDF (digital) | 347 (page/s) |
| PDF (ocr) | 2.7 (page/s) |
| PPT | 20 (page/s) |
| PPTX | 149 (page/s) |
| DOC | 600 (page/s) |
| DOCX | 1482 (page/s) |
All Thanks To Our Contributors:
Acknowledgments
🖊️ Citation
@misc{2024magic-doc,
title={Magic-Doc: A Toolkit that Converts Multiple File Types to Markdown},
author={Magic-Doc Contributors},
howpublished = {\url{https://github.com/InternLM/magic-doc}},
year={2024}
}
License
This project is released under the Apache 2.0 license.
Metadata
Release files for fairy-doc 0.1.44
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fairy_doc-0.1.44-py3-none-any.whl | Python 3 | none | any | Details for fairy_doc-0.1.44-py3-none-any.whl |
Release files / fairy_doc-0.1.44-py3-none-any.whl
| Download URL | fairy_doc-0.1.44-py3-none-any.whl |
|---|---|
| Size | 797.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a85fe33ccf69825919df03a203604a3157a6d2ac9f1ea445cc36b2befd8f2a81
|
|
BLAKE2b-256 checksum How to use checksums |
e61008d7b7e3ad8ee69f3cd8fc5d90bd85dab6042debd8d6c7a3df7db61ec678
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.10.12
|
Security for fairy-doc 0.1.44
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.