papermerge icon indicating copy to clipboard operation
papermerge copied to clipboard

folder watcher

Open WolfgangFahl opened this issue 1 year ago • 2 comments

As asked in https://www.reddit.com/r/Papermerge/comments/1ez7n06/papermount_making_inbox_and_db_available_via_mount/ i would love to have an option to make the inbox available via a "folder watcher". I want to configure my scan snap scanners so that they scan to a network directory. When a new pdf files shows up it should be immediately processed. An option for a restful callback that is triggered so that i can react in my own system and e.g. supply tags and other stuff (possibly via AI) and keep a different system in sync would be great.

WolfgangFahl avatar Aug 24 '24 14:08 WolfgangFahl

It is super simple to implement in (your favorite) any programming language. It is just a basic REST API client which will watch (local) folder, and whenever there is a new document/folder just use REST API to upload documents :)

Here is an example of REST API client code which uploads documents via REST API:

https://github.com/papermerge/papermerge-cli/blob/master/papermerge_cli/rest/documents.py#L14

I wrote it, but personally I don't use it.

ciur avatar Aug 24 '24 18:08 ciur

@ciur that is good news indeed.

WolfgangFahl avatar Aug 25 '24 13:08 WolfgangFahl