浏览代码

feat: 添加 PDF 批量处理脚本和处理器使用示例,支持多种处理方式

zhch158_admin 1 周之前
父节点
当前提交
9672d9c844
共有 1 个文件被更改,包括 42 次插入0 次删除
  1. 42 0
      zhch/README.md

+ 42 - 0
zhch/README.md

@@ -260,3 +260,45 @@ python ppstructurev3_single_client.py --input_file "/Users/zhch158/workspace/dat
 python ppstructurev3_single_client.py --input_file "//Users/zhch158/workspace/data/流水分析/德_内蒙古银行照.pdf" --output_dir "/Users/zhch158/workspace/data/流水分析/德_内蒙古银行照/data_PPStructureV3_Results" --api_url "http://10.192.72.11:8111/layout-parsing" --timeout 300
 
 ```
+
+# process_pdf_batch.sh
+```bash
+# 方法1: 使用文件列表
+chmod +x process_pdf_batch.sh
+./process_pdf_batch.sh -f pdf_list.txt
+
+# 方法2: 直接指定 PDF 列表
+./process_pdf_batch.sh -p "A用户_单元格扫描流水.pdf,B用户_扫描流水.pdf,对公_招商银行图.pdf,德_内蒙古银行照.pdf"
+
+# 方法3: 处理指定目录下所有 PDF
+./process_pdf_batch.sh -d "/Users/zhch158/workspace/data/流水分析"
+
+# 方法4: 完整参数
+./process_pdf_batch.sh \
+    -s "ppstructurev3_single_client.py" \
+    -d "/Users/zhch158/workspace/data/流水分析" \
+    -o "data_PPStructureV3_Results" \
+    -u "http://10.192.72.11:8111/layout-parsing" \
+    -t 600 \
+    -f "pdf_list.txt"
+```
+
+```bash
+# 1. 查看所有处理器
+python batch_process_pdf.py --list-processors
+
+# 2. 使用 PPStructureV3 客户端 (默认输出: ppstructurev3_client_results)
+python batch_process_pdf.py -p ppstructurev3_single_client -f pdf_list.txt
+
+# 3. 使用 PPStructureV3 本地处理器 (默认输出: ppstructurev3_results)
+python batch_process_pdf.py -p ppstructurev3_single_process -f pdf_list.txt
+
+# 4. 使用 PaddleOCR-VL (默认输出: paddleocr_vl_results)
+python batch_process_pdf.py -p paddleocr_vl_single_process -f pdf_list.txt
+
+# 5. 覆盖默认输出目录
+python batch_process_pdf.py -p ppstructurev3_single_client -f pdf_list.txt -o custom_output
+
+# 6. 模拟运行查看配置
+python batch_process_pdf.py -p ppstructurev3_single_client -f pdf_list.txt --dry-run
+```