recpdf 0.1.6__py3-none-any.whl → 0.1.8__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- recpdf/__init__.py +9 -1
- {recpdf-0.1.6.dist-info → recpdf-0.1.8.dist-info}/METADATA +5 -5
- recpdf-0.1.8.dist-info/RECORD +10 -0
- recpdf-0.1.6.dist-info/RECORD +0 -10
- {recpdf-0.1.6.dist-info → recpdf-0.1.8.dist-info}/WHEEL +0 -0
- {recpdf-0.1.6.dist-info → recpdf-0.1.8.dist-info}/entry_points.txt +0 -0
- {recpdf-0.1.6.dist-info → recpdf-0.1.8.dist-info}/licenses/LICENSE +0 -0
recpdf/__init__.py
CHANGED
|
@@ -1 +1,9 @@
|
|
|
1
|
-
from .parser import parse_pdf, refine_markdown
|
|
1
|
+
from .parser import parse_pdf, refine_markdown
|
|
2
|
+
|
|
3
|
+
# Version information
|
|
4
|
+
try:
|
|
5
|
+
from importlib.metadata import version
|
|
6
|
+
__version__ = version("recpdf")
|
|
7
|
+
except ImportError:
|
|
8
|
+
# Fallback for Python < 3.8
|
|
9
|
+
__version__ = "0.0.0"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: recpdf
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.8
|
|
4
4
|
Summary: Using large model to parse and translate PDF.
|
|
5
5
|
Author-Email: FreeCode001 <freecode0902@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -68,7 +68,7 @@ print("解析完成,markdown内容已保存到指定目录")
|
|
|
68
68
|
|
|
69
69
|
您也可以通过环境变量设置API相关参数,这样在调用函数时就不需要传递这些参数了:
|
|
70
70
|
|
|
71
|
-
1.
|
|
71
|
+
1. 创建一个`.env`文件:
|
|
72
72
|
|
|
73
73
|
```
|
|
74
74
|
VLM_API_KEY=your_api_key
|
|
@@ -102,7 +102,7 @@ content, rect_images = parse_pdf(
|
|
|
102
102
|
|
|
103
103
|
#### 调整Markdown结构
|
|
104
104
|
|
|
105
|
-
RecPDF
|
|
105
|
+
RecPDF还提供了一个`refine_markdown`函数,可以进一步优化生成的markdown文档结构:
|
|
106
106
|
|
|
107
107
|
```python
|
|
108
108
|
from recpdf.parser import refine_markdown
|
|
@@ -139,7 +139,7 @@ recpdf/
|
|
|
139
139
|
|
|
140
140
|
## 示例
|
|
141
141
|
|
|
142
|
-
项目提供了一些示例PDF
|
|
142
|
+
项目提供了一些示例PDF文件和输出结果,位于`examples/`目录中:
|
|
143
143
|
|
|
144
144
|
- `examples/test1.pdf` - 简单文本PDF示例
|
|
145
145
|
- `examples/test2.pdf` - 包含图片的PDF示例
|
|
@@ -162,5 +162,5 @@ recpdf/
|
|
|
162
162
|
|
|
163
163
|
## 联系方式
|
|
164
164
|
|
|
165
|
-
- 作者:
|
|
165
|
+
- 作者:FreeCode001
|
|
166
166
|
- 邮箱:freecode0902@gmail.com
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
recpdf-0.1.8.dist-info/METADATA,sha256=_HXNJTBgEpigV2Vv1jQkux7aEf5RGbTU-oUqnApYMek,4403
|
|
2
|
+
recpdf-0.1.8.dist-info/WHEEL,sha256=Wb0ASbVj8JvWHpOiIpPi7ucfIgJeCi__PzivviEAQFc,90
|
|
3
|
+
recpdf-0.1.8.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
|
|
4
|
+
recpdf-0.1.8.dist-info/licenses/LICENSE,sha256=FH-K2UOWCVM6xokmofQ9aAl4Y8zStxLC-KVuZPXZmzI,1067
|
|
5
|
+
recpdf/__init__.py,sha256=6PUAw1YSfFODu3d0zWYRGBfTD9URuTbHa9XSXNqyFi4,231
|
|
6
|
+
recpdf/models.py,sha256=yo3qg9Iv4iTf-1TmZFUMpKctxcGjsr5hlz8x9owEZLA,800
|
|
7
|
+
recpdf/parser.py,sha256=kQLpHNso_o5BaBa12h32zOFp9lQxjGFubgb3zL5Treo,10668
|
|
8
|
+
recpdf/prompts.py,sha256=1HAbiO_kxkb8syrGB1WIBHXixEmjmiBlVEFO8w3qCKI,2839
|
|
9
|
+
recpdf/utils.py,sha256=KnJ_0X9ho0zMeQtzjOpwTCKBRoKcc-5scjpJus_7UFc,3355
|
|
10
|
+
recpdf-0.1.8.dist-info/RECORD,,
|
recpdf-0.1.6.dist-info/RECORD
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
recpdf-0.1.6.dist-info/METADATA,sha256=Kimwa_mHlWT9XNldw34DafTcEoq7DiM9BBndKu0uP_s,4403
|
|
2
|
-
recpdf-0.1.6.dist-info/WHEEL,sha256=Wb0ASbVj8JvWHpOiIpPi7ucfIgJeCi__PzivviEAQFc,90
|
|
3
|
-
recpdf-0.1.6.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
|
|
4
|
-
recpdf-0.1.6.dist-info/licenses/LICENSE,sha256=FH-K2UOWCVM6xokmofQ9aAl4Y8zStxLC-KVuZPXZmzI,1067
|
|
5
|
-
recpdf/__init__.py,sha256=2xMhnjfCt2lbIt-7MqQ5xTrWebGOgtk4R8HjJiSfIeo,46
|
|
6
|
-
recpdf/models.py,sha256=yo3qg9Iv4iTf-1TmZFUMpKctxcGjsr5hlz8x9owEZLA,800
|
|
7
|
-
recpdf/parser.py,sha256=kQLpHNso_o5BaBa12h32zOFp9lQxjGFubgb3zL5Treo,10668
|
|
8
|
-
recpdf/prompts.py,sha256=1HAbiO_kxkb8syrGB1WIBHXixEmjmiBlVEFO8w3qCKI,2839
|
|
9
|
-
recpdf/utils.py,sha256=KnJ_0X9ho0zMeQtzjOpwTCKBRoKcc-5scjpJus_7UFc,3355
|
|
10
|
-
recpdf-0.1.6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|