No description
- Python 97.6%
- Dockerfile 2.4%
Legt vor jede Bilddatei im Input-Ordner die Datei vorlage.png und erstellt daraus eine zweiseitige PDF: vorlage.png + <datei>.png -> <dateiname>-fertig.pdf |
||
|---|---|---|
| dockerbuild | ||
| import | ||
| ocr_output | ||
| python_scripts | ||
| .gitignore | ||
| barcode_divider.pdf | ||
| docker-compose.yml | ||
| LICENSE | ||
| README.md | ||
scantool
Alpha-Stage Build for a tool to set a bunch of duplex scanned png or jpg (with divider) into ocr-ready pdf documents.
Setup
- Clone this repo to your system:
git clone https://codeberg.org/samsy/scantool.git
- Start docker-compose build:
docker compose up -d
-
Put some scanned pictures in your ./import dir. (the script needs a divider-picture scanned between documents, see barcode_divider.pdf)
-
Start converting with the integrated fast-API:
curl -X POST http://localhost:51822/scan -d '{"input_folder":"/data/import","output_folder":"/data/ocr_output"}' -H "Content-Type: application/json"
*localhost could also be internal IP or the dockername (ocr-python)
Alternative: Start converting directly:
# Without checking blank_pages:
docker compose exec ocr-python python ocr_split_no_blank.py /data/import /data/ocr_output
# Just do everything:
docker compose exec ocr-python python ocr_split.py /data/import /data/ocr_output
# Just remove blank_pages (maybe change from png to jpg) but no pdf or ocr addings
docker compose exec ocr-python python remove_blanks.py /data/import /data/ocr_output
- Finish (output is in german, feel free to translate it)