New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal: Add Directory Watching Functionality #465
Comments
I agree that this is important enough functionality to have a standard way to do this. I do have some documentation about using watchdog... ...but I think it would be useful to expand this documentation to cover many more cases, put some scripts into misc/ as you propose, rewrite that script to use the ocrmypdf API instead of CLI, and write some tests against it so it stays functional and we catch regressions. I think it's better to teach people how to set up common configurations than try to embed this ocrmypdf. Some people have complex renaming rules - what someone might want to happen to a new file in a watched folder could easily need to be fully programmable and Turing complete. I haven't done it for a while but my past experience was that Docker wasn't always reliable at signalling file system events with external volumes, especially if a network share is involved. |
This is helpful, I didn't know about this. Doing a little googling it looks like this is only an issue on windows due to CIFS not supporting inotify events. I'll whip up a little proof of concept to test. Also just to be sure, you're suggesting that we use the actual python API, as opposed to calling |
Yes. While |
PR opened. I'll close this for now and we can move discussion there. |
Following the contributing guidelines, I am opening a new issue to discuss potentially adding new functionality to OCRmyPDF.
I want to propose adding a small script that would enable directory watching. The goal of this would be to:
I'm thinking the high level design would look like:
misc/
(same placewebserver.py
is) that would execute watchdog with appropriate arguments.I think two things worth getting your feedback on are:
Also just to be clear, I would be writing the PR for this :) What do you think?
The text was updated successfully, but these errors were encountered: