You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just wanted to suggest a new feature, which would let papermerge-cli watch a directory and run an import action on a queue of new files. I think this could be implemented using the watchdog package. It supports patterns to limit the reaction to a defined set of filepath structures.
This way one could quite easily get documents scanned by a document scanning system into a directory structure to upload to papermerge. By using multiple instances of the papermerge-cli with diffferent settings, the upload could go into different folders of papermeerge dependend on naming or path of the files.
Outline
Goal would be to go over the queue with a rate limit (to not blast the papermerge api when many files added) and first check against papermerge if a document of the same file-hash is already known. If yes, the file would be ignored and the identified object-id in the database logged. If the file is not known, start an import.
If the papermerge instance is not reachable, log and recheck after a settable timespan. If the file upload fails due to reasons concerning the file, not the papermerge instance (filetype rejected for example) ignore it until the watchdog is restarted.
I would be willing familiarize myself with the code and to prepare a PR, if this feature is wanted. Just be warned, this may take some time due to a very busy schedule.
Thanks!
Jörn
The text was updated successfully, but these errors were encountered:
Hi!
Just wanted to suggest a new feature, which would let papermerge-cli watch a directory and run an import action on a queue of new files. I think this could be implemented using the watchdog package. It supports patterns to limit the reaction to a defined set of filepath structures.
This way one could quite easily get documents scanned by a document scanning system into a directory structure to upload to papermerge. By using multiple instances of the papermerge-cli with diffferent settings, the upload could go into different folders of papermeerge dependend on naming or path of the files.
Outline
Goal would be to go over the queue with a rate limit (to not blast the papermerge api when many files added) and first check against papermerge if a document of the same file-hash is already known. If yes, the file would be ignored and the identified object-id in the database logged. If the file is not known, start an import.
If the papermerge instance is not reachable, log and recheck after a settable timespan. If the file upload fails due to reasons concerning the file, not the papermerge instance (filetype rejected for example) ignore it until the watchdog is restarted.
I would be willing familiarize myself with the code and to prepare a PR, if this feature is wanted. Just be warned, this may take some time due to a very busy schedule.
Thanks!
Jörn
The text was updated successfully, but these errors were encountered: