feat: add docfill mvp cli
This commit is contained in:
16
examples/README.md
Normal file
16
examples/README.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# docfill examples
|
||||
|
||||
These examples are intentionally small and script-friendly.
|
||||
|
||||
Run all examples through the smoke script:
|
||||
|
||||
```bash
|
||||
bash scripts/smoke.sh
|
||||
```
|
||||
|
||||
The smoke script copies this directory to a temp folder, generates the Office and SQLite fixture files, builds `docfill`, and runs the example tasks.
|
||||
|
||||
## Examples
|
||||
|
||||
- `excel-to-word`: Excel daily rows to Word daily reports.
|
||||
- `sqlite-to-excel`: SQLite summary rows to Excel department reports.
|
||||
18
examples/excel-to-word/task.json
Normal file
18
examples/excel-to-word/task.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"vars": {
|
||||
"date": "2026-06-18"
|
||||
},
|
||||
"data": {
|
||||
"type": "excel",
|
||||
"path": "./data.xlsx",
|
||||
"sheet": "Daily",
|
||||
"header_row": 1
|
||||
},
|
||||
"template": {
|
||||
"path": "./template.docx"
|
||||
},
|
||||
"output": {
|
||||
"path": "./out/daily_{{date}}_{{name}}_{{_row}}.docx",
|
||||
"overwrite": true
|
||||
}
|
||||
}
|
||||
18
examples/sqlite-to-excel/task.json
Normal file
18
examples/sqlite-to-excel/task.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"vars": {
|
||||
"date": "2026-06-18"
|
||||
},
|
||||
"data": {
|
||||
"type": "sqlite",
|
||||
"path": "./data.db",
|
||||
"query": "select department, report_date, total_count, abnormal_count from department_summary where report_date = ? order by department",
|
||||
"params": ["{{date}}"]
|
||||
},
|
||||
"template": {
|
||||
"path": "./template.xlsx"
|
||||
},
|
||||
"output": {
|
||||
"path": "./out/summary_{{department}}_{{_row}}.xlsx",
|
||||
"overwrite": true
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user