Scroll to navigation

PAPERWORK-SHELL(1) User commands PAPERWORK-SHELL(1)

NAME

paperwork-shell - cli interface to paperwork

SYNOPSIS

paperwork-shell command

DESCRIPTION

Paperwork shell is a cli interface to control paperwork working directory. Most commands output a JSON structure.

COMMANDS

Show help for paperwork-shell
Quiet mode (JSON reply only)
Batch mode (never ask any question)

Show help for command or all commands by default
Start paperwork and immediately scan a page
Add a label on a document. Color must be specified if the label doesn't exists yet. Color will be ignored if the label already exists. Color format must be given in hexadecimal format (e.g. #abcdef). Document must be specified using the ID of the document (see search command).

delete_doc document document must be specified using its ID (see search command)

Dump the content of the specified document. You can specify which page to dump with its number. Beware, page start from 1. Document must be specified using its ID (see search command). Beware: This is the only command not replying in JSON format
Export all documents as PDF files in output_fir folder. Default quality is 50. Default page format is A4.
Export one document as a PDF file named filename. Default quality is 50. Default page format is A4.
Guess the labels that should be set on the document. Guessed labels are not applied by default, if you wan them to be applied, invoke with the --apply argument. Document must be specified using its ID.
Import a file or a PDF folder. OCR is run by default on images and on PDF pages without text (PDF containing only images) (use --no_ocr to disable). You can disable automatic label guessing by using --no_label_guessing option. You can add the file to an existing document by using the --append option. Document must be specified using its ID (see searc command). Please keep in mind that documents that are already in the word directory are never imported again and are simply silently ignored.
Re-run the OCR on the specified elements. Elements can be whole documents or specific pages (see EXAMPLE). Specifies the language to use for OCR with --lang option (check OCR tool for supported language). The default language used is the one in Paperwork's configuration. Run through pages without text only using the --empty_only otherwise, all pages are processed.
Remove a label from a document. Note that if the document was the last one to use the label, the label may disappear entirely from Paperwork. Document must be specified using its ID (see search command).
Change the ID of a document. Note that the document id are also their date. Using an ID that is not a date may have side effects (the main one being the document won't be sorted correctly).
Rescan the work directory. Look for new, updated or deleted documents and update the index accordingly.
List the documents containing the keywords. Syntax is the same than with the search field in Paperwork-gui. Search "" (empty string) to get all the documents. See EXAMPLE.
Show document information (but not its content, see dump). See search for the document id.
Change current Paperwork's work directory to path. Does not update the index. You should run the rescan command after this one.

EXAMPLE

  • Get help for the rescan command:

    paperwork-shell help rescan

  • Create a new label and add it to a document:

    paperwork-shell add_label 19700101_0000_01 important #ff0000

  • Delete a document:

    paperwork-shell delete_doc 19700101_0000_01

  • Dump the third page of a document:

    paperwork-shell dump 19700101_0000_01 3

  • Export all documents into a folder:

    paperwork-shell export_all export-folder --quality 80 --format A4

  • Export one document:

    paperwork-shell export_doc 19700101_0000_01 important_doc.pdf --quality 30

  • Guess labels of a document without applying them:

    paperwork-shell guess_labels 19700101_0000_01

  • Import a folder of PDF files into paperwork workdir:

    paperwork-shell import folder/

  • Add an image to an existing document:

    paperwork-shell import image.png -- --append 19700101_0000_01

  • Redo OCR on a documents with another language:

    paperwork-shell ocr 19700101_0000_01 -- --lang jpn

  • Redo OCR on a specific page:

    paperwork-shell ocr "19700101_0000_01|2"

  • Remove a label from a document:

    paperwork-shell remove_label 19700101_0000_01 important

  • Rescan working:

    paperwork-shell rescan

  • Search documents in workdir:

    paperwork-shell search "label:important AND paperwork"

  • Show document information:

    paperwork-shell show 19700101_0000_01

  • Change workdir

    paperwork-shell switch_workdir ~/papers


SEE ALSO


AUTHOR

Thomas Perret, 2019

COPYRIGHT

GPL-3.0+

1.3.0