mirror of
https://github.com/Dadido3/Scanyonero.git
synced 2025-06-06 01:10:00 +00:00
service/linux/systemd | ||
go.mod | ||
init.go | ||
main.go | ||
README.md | ||
runner.go |
OCRmyPDF runner
A very simple tool that listens for files in a directory, and runs OCRmyPDF on them.
This is needed as paperless(-ngx) will always create a copy of the document with its built in clean up and OCR feature. Even external pre-consumption scripts will be run on all new documents, not just files in from consumption directory. So the solution is to have this watchdog/runner that only pre-processes scanned documents, and leaves everything else untouched.
The idea is to let it watch a directory any scanner will scan into, and then this runner will write the final pre-processed document into a directory paperless watches.
Usage
- Install the project somewhere.
- Edit main.go to use the correct paths to your scanner and paperless consumption directories.
- Copy the ocrmypdf-runner.service into your paperless systemd services directory (
%HOME/.config/systemd/user/ocrmypdf-runner.service
). systemctl --user daemon-reload
systemctl --user enable ocrmypdf-runner.service
systemctl --user start ocrmypdf-runner.service