markitdown-paddleocr 0.2.0__tar.gz → 0.2.2__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: markitdown-paddleocr
3
- Version: 0.2.0
3
+ Version: 0.2.2
4
4
  Summary: Intelligent PDF/Image to Markdown converter using PaddleOCR cloud API
5
5
  Project-URL: Documentation, https://github.com/microsoft/markitdown#readme
6
6
  Project-URL: Issues, https://github.com/microsoft/markitdown/issues
@@ -182,39 +182,78 @@ PaddleOcrConverter.convert()
182
182
 
183
183
  ### 前置条件
184
184
 
185
- - 确保已安装 `build` 和 `twine`:
185
+ 1. 安装构建工具:
186
186
 
187
187
  ```bash
188
- pip install build twine
188
+ pip install build twine hatch
189
189
  ```
190
190
 
191
- - 确保环境变量 `PyPI_API_Token` 已设置为你的 PyPI API Token
191
+ 2. 配置 PyPI API Token(Windows 用户环境变量):
192
192
 
193
+ ```powershell
194
+ # PowerShell 设置用户环境变量
195
+ [System.Environment]::SetEnvironmentVariable('PYPI_API_TOKEN', 'pypi-...', 'User')
196
+ ```
197
+
198
+ 或在 Bash/Zsh 中:
199
+
200
+ ```bash
201
+ export PYPI_API_TOKEN="pypi-..."
202
+ ```
203
+
204
+ ### 快速发布(推荐)
205
+
206
+ 项目根目录提供了上传脚本,可一键发布两个插件:
207
+
208
+ **Bash / Git Bash:**
193
209
  ```bash
194
- export PyPI_API_Token="pypi-..."
210
+ # 构建两个插件
211
+ cd packages/markitdown-glmocr && hatch build
212
+
213
+ cd ../markitdown-paddleocr && hatch build
214
+
215
+ # 上传(自动上传所有构建的版本)
216
+ cd ../..
217
+ ./scripts/pypi-upload.sh
218
+
219
+ # 或指定版本号
220
+ ./scripts/pypi-upload.sh 0.2.0
221
+ ```
222
+
223
+ **PowerShell:**
224
+ ```powershell
225
+ # 构建两个插件
226
+ cd packages/markitdown-glmocr; hatch build
227
+ cd ../markitdown-paddleocr; hatch build
228
+
229
+ # 上传
230
+ cd ../..
231
+ .\scripts\pypi-upload.ps1
232
+
233
+ # 或指定版本号
234
+ .\scripts\pypi-upload.ps1 -Version "0.2.0"
195
235
  ```
196
236
 
197
- ### 发布步骤
237
+ ### 手动发布
198
238
 
199
239
  ```bash
200
- # 1. 进入项目根目录(包含 pyproject.toml)
240
+ # 1. 进入项目目录
201
241
  cd packages/markitdown-paddleocr
202
242
 
203
- # 2. 构建分发包(生成 dist/ 目录下的 .tar.gz 和 .whl 文件)
204
- python -m build
243
+ # 2. 构建
244
+ hatch build
205
245
 
206
- # 3. 检查包的元数据和内容
246
+ # 3. 检查
207
247
  twine check dist/*
208
248
 
209
- # 4. 上传到 PyPI(使用环境变量中的 Token 认证)
210
- twine upload dist/* -u __token__ -p "$PyPI_API_Token"
249
+ # 4. 上传
250
+ twine upload --username __token__ --password "$PYPI_API_TOKEN" --disable-progress-bar dist/*
211
251
  ```
212
252
 
213
253
  ### 发布到 TestPyPI(测试)
214
254
 
215
255
  ```bash
216
- # 先上传到 TestPyPI 验证包是否正确
217
- twine upload --repository testpypi dist/* -u __token__ -p "$PyPI_API_Token"
256
+ twine upload --repository testpypi --username __token__ --password "$PYPI_API_TOKEN" --disable-progress-bar dist/*
218
257
 
219
258
  # 从 TestPyPI 安装验证
220
259
  pip install --index-url https://test.pypi.org/simple/ markitdown-paddleocr
@@ -222,9 +261,9 @@ pip install --index-url https://test.pypi.org/simple/ markitdown-paddleocr
222
261
 
223
262
  ### 注意事项
224
263
 
225
- - 发布前确保 `pyproject.toml` 中的版本号已更新
264
+ - 发布前确保 `src/markitdown_paddleocr/__about__.py` 中的版本号已更新
226
265
  - 同一版本号不能重复上传,如需修正必须 bump 版本号
227
- - `PyPI_API_Token` 环境变量切勿硬编码到脚本或提交到代码仓库
266
+ - `PYPI_API_TOKEN` 切勿提交到代码仓库
228
267
 
229
268
  ## 许可证
230
269
 
@@ -156,39 +156,78 @@ PaddleOcrConverter.convert()
156
156
 
157
157
  ### 前置条件
158
158
 
159
- - 确保已安装 `build` 和 `twine`:
159
+ 1. 安装构建工具:
160
160
 
161
161
  ```bash
162
- pip install build twine
162
+ pip install build twine hatch
163
163
  ```
164
164
 
165
- - 确保环境变量 `PyPI_API_Token` 已设置为你的 PyPI API Token
165
+ 2. 配置 PyPI API Token(Windows 用户环境变量):
166
166
 
167
+ ```powershell
168
+ # PowerShell 设置用户环境变量
169
+ [System.Environment]::SetEnvironmentVariable('PYPI_API_TOKEN', 'pypi-...', 'User')
170
+ ```
171
+
172
+ 或在 Bash/Zsh 中:
173
+
174
+ ```bash
175
+ export PYPI_API_TOKEN="pypi-..."
176
+ ```
177
+
178
+ ### 快速发布(推荐)
179
+
180
+ 项目根目录提供了上传脚本,可一键发布两个插件:
181
+
182
+ **Bash / Git Bash:**
167
183
  ```bash
168
- export PyPI_API_Token="pypi-..."
184
+ # 构建两个插件
185
+ cd packages/markitdown-glmocr && hatch build
186
+
187
+ cd ../markitdown-paddleocr && hatch build
188
+
189
+ # 上传(自动上传所有构建的版本)
190
+ cd ../..
191
+ ./scripts/pypi-upload.sh
192
+
193
+ # 或指定版本号
194
+ ./scripts/pypi-upload.sh 0.2.0
195
+ ```
196
+
197
+ **PowerShell:**
198
+ ```powershell
199
+ # 构建两个插件
200
+ cd packages/markitdown-glmocr; hatch build
201
+ cd ../markitdown-paddleocr; hatch build
202
+
203
+ # 上传
204
+ cd ../..
205
+ .\scripts\pypi-upload.ps1
206
+
207
+ # 或指定版本号
208
+ .\scripts\pypi-upload.ps1 -Version "0.2.0"
169
209
  ```
170
210
 
171
- ### 发布步骤
211
+ ### 手动发布
172
212
 
173
213
  ```bash
174
- # 1. 进入项目根目录(包含 pyproject.toml)
214
+ # 1. 进入项目目录
175
215
  cd packages/markitdown-paddleocr
176
216
 
177
- # 2. 构建分发包(生成 dist/ 目录下的 .tar.gz 和 .whl 文件)
178
- python -m build
217
+ # 2. 构建
218
+ hatch build
179
219
 
180
- # 3. 检查包的元数据和内容
220
+ # 3. 检查
181
221
  twine check dist/*
182
222
 
183
- # 4. 上传到 PyPI(使用环境变量中的 Token 认证)
184
- twine upload dist/* -u __token__ -p "$PyPI_API_Token"
223
+ # 4. 上传
224
+ twine upload --username __token__ --password "$PYPI_API_TOKEN" --disable-progress-bar dist/*
185
225
  ```
186
226
 
187
227
  ### 发布到 TestPyPI(测试)
188
228
 
189
229
  ```bash
190
- # 先上传到 TestPyPI 验证包是否正确
191
- twine upload --repository testpypi dist/* -u __token__ -p "$PyPI_API_Token"
230
+ twine upload --repository testpypi --username __token__ --password "$PYPI_API_TOKEN" --disable-progress-bar dist/*
192
231
 
193
232
  # 从 TestPyPI 安装验证
194
233
  pip install --index-url https://test.pypi.org/simple/ markitdown-paddleocr
@@ -196,9 +235,9 @@ pip install --index-url https://test.pypi.org/simple/ markitdown-paddleocr
196
235
 
197
236
  ### 注意事项
198
237
 
199
- - 发布前确保 `pyproject.toml` 中的版本号已更新
238
+ - 发布前确保 `src/markitdown_paddleocr/__about__.py` 中的版本号已更新
200
239
  - 同一版本号不能重复上传,如需修正必须 bump 版本号
201
- - `PyPI_API_Token` 环境变量切勿硬编码到脚本或提交到代码仓库
240
+ - `PYPI_API_TOKEN` 切勿提交到代码仓库
202
241
 
203
242
  ## 许可证
204
243
 
@@ -0,0 +1 @@
1
+ __version__ = "0.2.2"
@@ -1 +0,0 @@
1
- __version__ = "0.2.0"