unidoc / unipdf-cli

CLI for PDF processing using unipdf

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Watched folders for compress/optimize with a task queue

gunnsth opened this issue · comments

Idea:

unicli optimize --watch /folder --out /path/to/outputs

watches /folder for input files, for each new PDF that is seen, puts compress task info on a task queue.
Runs a task queue with 4 goroutines (configurable number) which processes each new task and writes the optimized PDF to the output folder.

Upon starting should process the PDF files that are in the folder at the time of starting.

Options

  • Keep a copy of the original (write as filename.orig.pdf in the same output folder)
  • Error handling. If there is an error, write to an error log, possibly create a filename_error.txt in the output folder.