virantha / pypdfocr

Python script to do PDF OCR conversion using Tesseract
Apache License 2.0
372 stars 114 forks source link

Allow killing the process via Ctrl+C #31

Closed zaroth closed 8 years ago

zaroth commented 9 years ago

A custom signal handler for SIGINT to shutdown pypdfocr would be nice, since interrupting the script during 700-page tesseract OCR seems impossible...

zaroth commented 9 years ago

Just for reference, stackoverflow threads I found related to the issue:

http://stackoverflow.com/questions/11312525/catch-ctrlc-and-exit-multiprocesses-gracefully-in-python http://stackoverflow.com/questions/1408356/keyboard-interrupts-with-pythons-multiprocessing-pool

virantha commented 8 years ago

Fixed, at least on mac os x; will be released on 0.8.3 shortly