chore: prepare docfill project for gitea
This commit is contained in:
BIN
manual_tests/01_excel_to_word/daily_report_template.docx
Normal file
BIN
manual_tests/01_excel_to_word/daily_report_template.docx
Normal file
Binary file not shown.
BIN
manual_tests/01_excel_to_word/out/daily_2026-06-18_张三_测试_1.docx
Normal file
BIN
manual_tests/01_excel_to_word/out/daily_2026-06-18_张三_测试_1.docx
Normal file
Binary file not shown.
BIN
manual_tests/01_excel_to_word/out/daily_2026-06-18_李四_2.docx
Normal file
BIN
manual_tests/01_excel_to_word/out/daily_2026-06-18_李四_2.docx
Normal file
Binary file not shown.
BIN
manual_tests/01_excel_to_word/source_daily_data.xlsx
Normal file
BIN
manual_tests/01_excel_to_word/source_daily_data.xlsx
Normal file
Binary file not shown.
19
manual_tests/01_excel_to_word/task.json
Normal file
19
manual_tests/01_excel_to_word/task.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"vars": {
|
||||
"date": "2026-06-18",
|
||||
"batch": "默认班次"
|
||||
},
|
||||
"data": {
|
||||
"type": "excel",
|
||||
"path": "./source_daily_data.xlsx",
|
||||
"sheet": "Daily",
|
||||
"header_row": 1
|
||||
},
|
||||
"template": {
|
||||
"path": "./daily_report_template.docx"
|
||||
},
|
||||
"output": {
|
||||
"path": "./out/daily_{{date}}_{{name}}_{{_row}}.docx",
|
||||
"overwrite": true
|
||||
}
|
||||
}
|
||||
BIN
manual_tests/02_sqlite_to_excel/department_summary_template.xlsx
Normal file
BIN
manual_tests/02_sqlite_to_excel/department_summary_template.xlsx
Normal file
Binary file not shown.
BIN
manual_tests/02_sqlite_to_excel/out/summary_客服部_1.xlsx
Executable file
BIN
manual_tests/02_sqlite_to_excel/out/summary_客服部_1.xlsx
Executable file
Binary file not shown.
BIN
manual_tests/02_sqlite_to_excel/out/summary_营销部_2.xlsx
Executable file
BIN
manual_tests/02_sqlite_to_excel/out/summary_营销部_2.xlsx
Executable file
Binary file not shown.
BIN
manual_tests/02_sqlite_to_excel/source_summary.db
Normal file
BIN
manual_tests/02_sqlite_to_excel/source_summary.db
Normal file
Binary file not shown.
20
manual_tests/02_sqlite_to_excel/task.json
Normal file
20
manual_tests/02_sqlite_to_excel/task.json
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"vars": {
|
||||
"date": "2026-06-18"
|
||||
},
|
||||
"data": {
|
||||
"type": "sqlite",
|
||||
"path": "./source_summary.db",
|
||||
"query": "select department, report_date, total_count, abnormal_count, owner from department_summary where report_date = ? order by department",
|
||||
"params": [
|
||||
"{{date}}"
|
||||
]
|
||||
},
|
||||
"template": {
|
||||
"path": "./department_summary_template.xlsx"
|
||||
},
|
||||
"output": {
|
||||
"path": "./out/summary_{{department}}_{{_row}}.xlsx",
|
||||
"overwrite": true
|
||||
}
|
||||
}
|
||||
BIN
manual_tests/03_excel_to_excel/audit_template.xlsx
Normal file
BIN
manual_tests/03_excel_to_excel/audit_template.xlsx
Normal file
Binary file not shown.
BIN
manual_tests/03_excel_to_excel/out/audit_2026-06-18_王五_1.xlsx
Executable file
BIN
manual_tests/03_excel_to_excel/out/audit_2026-06-18_王五_1.xlsx
Executable file
Binary file not shown.
BIN
manual_tests/03_excel_to_excel/out/audit_2026-06-18_赵六_2.xlsx
Executable file
BIN
manual_tests/03_excel_to_excel/out/audit_2026-06-18_赵六_2.xlsx
Executable file
Binary file not shown.
BIN
manual_tests/03_excel_to_excel/source_audit_data.xlsx
Normal file
BIN
manual_tests/03_excel_to_excel/source_audit_data.xlsx
Normal file
Binary file not shown.
18
manual_tests/03_excel_to_excel/task.json
Normal file
18
manual_tests/03_excel_to_excel/task.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"vars": {
|
||||
"date": "2026-06-18"
|
||||
},
|
||||
"data": {
|
||||
"type": "excel",
|
||||
"path": "./source_audit_data.xlsx",
|
||||
"sheet": "Audit",
|
||||
"header_row": 2
|
||||
},
|
||||
"template": {
|
||||
"path": "./audit_template.xlsx"
|
||||
},
|
||||
"output": {
|
||||
"path": "./out/audit_{{date}}_{{employee}}_{{_row}}.xlsx",
|
||||
"overwrite": true
|
||||
}
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
25
manual_tests/04_filter_work_order_to_word/task.json
Normal file
25
manual_tests/04_filter_work_order_to_word/task.json
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"vars": {
|
||||
"date": "2026-06-18"
|
||||
},
|
||||
"data": {
|
||||
"type": "excel",
|
||||
"path": "./source_work_orders.xlsx",
|
||||
"sheet": "工单",
|
||||
"header_row": 1
|
||||
},
|
||||
"filter": {
|
||||
"equals": {
|
||||
"日期": "{{date}}",
|
||||
"工单编号": "{{ticket_no}}"
|
||||
},
|
||||
"expect": "one"
|
||||
},
|
||||
"template": {
|
||||
"path": "./work_order_template.docx"
|
||||
},
|
||||
"output": {
|
||||
"path": "./out/work_order_{{日期}}_{{工单编号}}.docx",
|
||||
"overwrite": true
|
||||
}
|
||||
}
|
||||
Binary file not shown.
131
manual_tests/README.md
Normal file
131
manual_tests/README.md
Normal file
@@ -0,0 +1,131 @@
|
||||
# docfill 手工测试素材
|
||||
|
||||
本目录提供四组可直接运行的本地测试素材,用于验证 `docfill` 对筛选、Word、Excel、Excel 数据源和 SQLite 数据源的支持情况。
|
||||
|
||||
运行前进入项目根目录:
|
||||
|
||||
```bash
|
||||
cd /Users/zhaoyilun/Documents/xls_doc
|
||||
```
|
||||
|
||||
构建工具:
|
||||
|
||||
```bash
|
||||
bash scripts/build.sh
|
||||
```
|
||||
|
||||
## 案例 1:Excel 数据生成 Word 日报
|
||||
|
||||
目录:
|
||||
|
||||
```text
|
||||
manual_tests/01_excel_to_word
|
||||
```
|
||||
|
||||
运行命令:
|
||||
|
||||
```bash
|
||||
dist/docfill-darwin-arm64 run -c manual_tests/01_excel_to_word/task.json --var batch=早班 --verbose
|
||||
```
|
||||
|
||||
输出示例:
|
||||
|
||||
```text
|
||||
generated 2 file(s)
|
||||
- /Users/zhaoyilun/Documents/xls_doc/manual_tests/01_excel_to_word/out/daily_2026-06-18_张三_测试_1.docx
|
||||
- /Users/zhaoyilun/Documents/xls_doc/manual_tests/01_excel_to_word/out/daily_2026-06-18_李四_2.docx
|
||||
```
|
||||
|
||||
## 案例 2:SQLite 数据生成 Excel 汇总表
|
||||
|
||||
目录:
|
||||
|
||||
```text
|
||||
manual_tests/02_sqlite_to_excel
|
||||
```
|
||||
|
||||
运行命令:
|
||||
|
||||
```bash
|
||||
dist/docfill-darwin-arm64 run -c manual_tests/02_sqlite_to_excel/task.json --var date=2026-06-18 --verbose
|
||||
```
|
||||
|
||||
输出示例:
|
||||
|
||||
```text
|
||||
generated 2 file(s)
|
||||
- /Users/zhaoyilun/Documents/xls_doc/manual_tests/02_sqlite_to_excel/out/summary_客服部_1.xlsx
|
||||
- /Users/zhaoyilun/Documents/xls_doc/manual_tests/02_sqlite_to_excel/out/summary_营销部_2.xlsx
|
||||
```
|
||||
|
||||
## 案例 3:Excel 数据生成 Excel 质检表
|
||||
|
||||
目录:
|
||||
|
||||
```text
|
||||
manual_tests/03_excel_to_excel
|
||||
```
|
||||
|
||||
运行命令:
|
||||
|
||||
```bash
|
||||
dist/docfill-darwin-arm64 run -c manual_tests/03_excel_to_excel/task.json --var date=2026-06-18 --verbose
|
||||
```
|
||||
|
||||
输出示例:
|
||||
|
||||
```text
|
||||
generated 2 file(s)
|
||||
- /Users/zhaoyilun/Documents/xls_doc/manual_tests/03_excel_to_excel/out/audit_2026-06-18_王五_1.xlsx
|
||||
- /Users/zhaoyilun/Documents/xls_doc/manual_tests/03_excel_to_excel/out/audit_2026-06-18_赵六_2.xlsx
|
||||
```
|
||||
|
||||
## 案例 4:按日期和工单编号筛选一条工单并生成 Word
|
||||
|
||||
目录:
|
||||
|
||||
```text
|
||||
manual_tests/04_filter_work_order_to_word
|
||||
```
|
||||
|
||||
输入数据内容:
|
||||
|
||||
```text
|
||||
日期 工单编号 客户名称 系统来源 处理结果 下一步
|
||||
2026-06-18 GD-001 A 公司 PMS3.0 已派单 等待现场反馈
|
||||
2026-06-18 GD-002 B 公司 D5000 已完成 归档并同步日报
|
||||
2026-06-19 GD-001 C 公司 风控平台 待复核 补充截图
|
||||
```
|
||||
|
||||
运行命令:
|
||||
|
||||
```bash
|
||||
dist/docfill-darwin-arm64 run -c manual_tests/04_filter_work_order_to_word/task.json --var date=2026-06-18 --var ticket_no=GD-002 --verbose
|
||||
```
|
||||
|
||||
输出示例:
|
||||
|
||||
```text
|
||||
generated 1 file(s)
|
||||
- /Users/zhaoyilun/Documents/xls_doc/manual_tests/04_filter_work_order_to_word/out/work_order_2026-06-18_GD-002.docx
|
||||
```
|
||||
|
||||
查看结果:
|
||||
|
||||
```bash
|
||||
open manual_tests/04_filter_work_order_to_word/out
|
||||
```
|
||||
|
||||
## 重新生成素材
|
||||
|
||||
如需重新生成全部手工测试文件,执行:
|
||||
|
||||
```bash
|
||||
/Users/zhaoyilun/.cache/codex-runtimes/codex-primary-runtime/dependencies/python/bin/python3 scripts/make-manual-test-materials.py
|
||||
```
|
||||
|
||||
输出示例:
|
||||
|
||||
```text
|
||||
/Users/zhaoyilun/Documents/xls_doc/manual_tests
|
||||
```
|
||||
BIN
manual_tests/_evaluation_rendered/daily/page-1.png
Normal file
BIN
manual_tests/_evaluation_rendered/daily/page-1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 83 KiB |
BIN
manual_tests/_evaluation_rendered/filter/page-1.png
Normal file
BIN
manual_tests/_evaluation_rendered/filter/page-1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 66 KiB |
Reference in New Issue
Block a user