Command-line and Web Interface for Paperwork

I am very fortunate that one jflesch on GitHub decided one day to create Paperwork! This excellent program evolved very quickly and is still improving. I manage all my official documents, invoices, and such, in Paperwork. Scan by scan, PDF import by PDF import, I am slowly approaching the 2000 documents, or 5000 pages. This program has proved invaluable in the past year alone, both for speeding up the processing of new documents, and for looking for old documents.

Yet I miss one feature: the possibility to search the database of documents (which is on my home server) from any computer or mobile device, without having to launch Paperwork, which is only installed on the main family PC.

Besides, as I often connect to my server from distant places using OpenSSH, the possibility to do command-line searches would be a big improvement over my current use of find, grep, etc. Or I should rather say, my former use of find, grep, etc. Because…

Like many programmers, I tend to not let something like a missing program bother me too long. I wrote the missing program since it did not exist, and now I publish it, because it may be interesting to other people.

paperweb.jpgThe program is still at a very early stage. However, since it currently fulfills my needs, I’m not really sure where I’ll go from there…

The command-line interface is usable on its own, and its output is in JSON format, so that humans and programs can both comfortably use it. The WEB interface is based on the command-line interface, and care has been taken to ensure that the combination is secure.

The command-line interface should run on any Linux system, as its requirements are very standard; it does not use any Paperwork component, nor does it use the python language. The WEB interface only needs PHP and sudo. The one real requirement is that the machine that hosts these interfaces needs access to Paperwork’s data, preferably on local storage, or through a mount point.

You can get the program on my Git repository.

I think that I wrote all that was needed in the README file, but drop a comment if something is not clear or if I forgot something.

In short, the only dependencies are Linux (with sudo) and PHP. The CLI part is a single file, and the few files of the WEB part only need to be dropped to a PHP-enabled folder served by the web server (Apache, Nginx…).


  • 2016-02-01 — Minor update because the code evolved a bit.
  • 2017-02-16 — Fixed a typo: “yalic” instead of “yalis”…
  • 2017-04-20 — Circumvent port-knocking with a dedicated port (2222). To all who could not access my Git, please accept my apologies!
  • 2017-11-06 — A change of server had become necessary. It’s now done, and Git is now at a different address.


1. Le vendredi 10 février 2017, 18:23 par manusim

Bonjour, ce programme semble bien être ce que je cherche pour compléter Paperwork. Malheureusement, le git clone ne fonctionne pas pour moi, il s'arrête avec l'erreur connection timed out, could not read from remote repository. Y a-t-il un autre moyen d'obtenir ces fichiers (envoi mail ou autre) ?
Merci beaucoup

2. Le jeudi 16 février 2017, 22:14 par Yves

Réponse par mail :-) Il y avait une erreur dans l’article… Cheers!

Ajouter un commentaire

Le code HTML est affiché comme du texte et les adresses web sont automatiquement transformées.

La discussion continue ailleurs

URL de rétrolien :

Fil des commentaires de ce billet