Skip to content

Commit

Permalink
Merge pull request #7 from icecraft/fix/setup
Browse files Browse the repository at this point in the history
fix: setup requirements
  • Loading branch information
icecraft authored Jul 8, 2024
2 parents 40ac58e + f68dd79 commit 5020c6d
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

### Install

Prerequisites: python3.10+
Prerequisites: python3.10

Install Dependencies

Expand Down
23 changes: 19 additions & 4 deletions README_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
[![issue resolution](https://img.shields.io/github/issues-closed-raw/InternLM/magic-doc)](https://github.com/InternLM/magic-doc/issues)
[![open issues](https://img.shields.io/github/issues-raw/InternLM/magic-doc)](https://github.com/InternLM/magic-doc/issues)

<p align="center">
👋 加入我们 <a href="https://discord.gg/xa29JuW87d" target="_blank">Discord</a> 和 <a href="https://github.com/InternLM/InternLM/assets/25839884/a6aad896-7232-4220-ac84-9e070c2633ce" target="_blank">微信社区</a>
</p>

[English](README.md) | [简体中文](README_zh-CN.md)

</div>
Expand All @@ -15,7 +19,7 @@


### 安装
前置依赖: python3.10 +
前置依赖: python3.10

安装依赖

Expand Down Expand Up @@ -44,7 +48,7 @@ pip install fairy-doc[gpu] # 安装 gpu 版本

## 简介

Magic-Doc 是一个轻量级、开源的用于将多种格式的文档(PPT/PPTX/DOC/DOCX/PDF) 转化为 markdown 格式的工具。支持转换本地文档或者位于 AWS S3 上的文件
Magic-Doc 是一个轻量级、开源的用于将多种格式的文档(PPT/PPTX/DOC/DOCX/PDF转化为 markdown 格式的工具。支持转换本地文档或者位于 AWS S3 上的文件


## 使用示例
Expand All @@ -53,7 +57,7 @@ Magic-Doc 是一个轻量级、开源的用于将多种格式的文档(PPT/PPT
# for local file
from magic_doc.docconv import DocConverter, S3Config
converter = DocConverter(s3_config=None)
markdown_cotent, time_cost = converter.convert("some_doc.pptx", conv_timeout=300)
markdown_content, time_cost = converter.convert("some_doc.pptx", conv_timeout=300)
```

```python
Expand All @@ -62,7 +66,7 @@ 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.convert("s3://some_bucket/some_doc.pptx", conv_timeout=300)
markdown_content, time_cost = converter.convert("s3://some_bucket/some_doc.pptx", conv_timeout=300)
```


Expand All @@ -79,6 +83,17 @@ markdown_cotent, time_cost = converter.convert("s3://some_bucket/some_doc.pptx",
| DOCX | 1482 (page/s) |


## 🖊️ 引用

```bibtex
@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}
}
```


## 开源许可证

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def parse_requirements(filename):
long_description_content_type='text/markdown',
install_requires=parse_requirements("requirements.txt"), # 项目依赖的第三方库
url="https://github.com/InternLM/magic-doc",
python_requires=">=3.10", # 项目依赖的 Python 版本
python_requires="==3.10", # 项目依赖的 Python 版本
entry_points={
"console_scripts": [
"magic-doc=magic_doc.cli:cli_conv",
Expand Down

0 comments on commit 5020c6d

Please sign in to comment.