Go to file
David Vogel c82cd72a47 Get into working state
- Make compatible with at least go 1.19
- Fix paths
- Add more log output
- Update README.md
- Fix runner
- Update systemd service
2024-11-04 20:29:33 +01:00
service/linux/systemd Get into working state 2024-11-04 20:29:33 +01:00
go.mod Get into working state 2024-11-04 20:29:33 +01:00
init.go Get into working state 2024-11-04 20:29:33 +01:00
main.go Get into working state 2024-11-04 20:29:33 +01:00
README.md Get into working state 2024-11-04 20:29:33 +01:00
runner.go Get into working state 2024-11-04 20:29:33 +01:00

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

  1. Install the project somewhere.
  2. Edit main.go to use the correct paths to your scanner and paperless consumption directories.
  3. Copy the ocrmypdf-runner.service into your systemd services directory (etc/systemd/system/ocrmypdf-runner.service). You may have to change the user in the service file.
  4. systemctl daemon-reload
  5. systemctl enable ocrmypdf-runner.service
  6. systemctl start ocrmypdf-runner.service