A lightweight toolbox to manipulate documents
Project description
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 mulitple file type (PPT/PPTX/DOC/DOCX/PDF) to markdown. It supports both local file and S3 file.
Example
from magic_doc.docconv import DocConverter, S3Config
s3_config = S3Config(ak='${ak}', sk='${sk}', endpoint='${endpoint}')
converter = DocConverter(s3_config=s3_config)
markdown_cotent, time_cost = converter("some_doc.pptx", "/tmp/convert_progress.txt", conv_timeout=300)
Performance
ENV: AMD EPYC 7742 64-Core Processor, NVIDIA A100
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:
License
This project is released under the Apache 2.0 license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
fairy_doc-0.1.34-py3-none-any.whl
(846.3 kB
view hashes)
Close
Hashes for fairy_doc-0.1.34-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42d59df1001be0d5ecfbc0a7acd48cf1ea7bdcc2a4efcd25c81eb5b436d7ae4b |
|
MD5 | 82e24c4e3e378ebd2a420684e0b1d444 |
|
BLAKE2b-256 | 15b27872480ec3a42602ce4b5434dd4665b6a8105d49b2c14132ddaec9f8b4cf |