add merge tool

This commit is contained in:
2026-04-21 21:41:17 +02:00
parent 91a6c4a304
commit d4f89f39bd
2 changed files with 294 additions and 0 deletions

View File

@ -55,6 +55,19 @@ Or use the preconfigured VSCode tasks (`Ctrl+Shift+B`) and launch configurations
Tested with: [Epson TM T20II](https://www.epson.de/products/sd/pos-printer/epson-tm-t20ii). Other receipt printers should work as well.
## Tools
### merge_db
Merges multiple SQLite databases into one file with automatic deduplication.
Reference tables (`category`, `positionen`) are deduplicated by content; `jobs` rows are appended in order with re-sequenced IDs to avoid conflicts.
```bash
python tools/merge_db.py -o OUTPUT_DB INPUT_DB [INPUT_DB ...]
# Example
python tools/merge_db.py -o merged.db 02.db 03.db 04.db
```
## License
GPL-3.0