Skip to content
Joe Workman edited this page Mar 28, 2013 · 2 revisions

Here is an overview of the options available to paperless along with some helpful examples. See below for how to set these values using a paperless.rules.yaml config file.

Accessing Help

To access paperless help run the following command:

$ paperless help

Paperless has different commands (see below). You can access the help for each command by typing the command after the help command like so:

$ paperless help create

Command Modes

Paperless has the following command modes. You can always access the the help for each command via command line: $ paperless help <command>

create

NAME
    create - Create a new note from a file.

SYNOPSIS
    paperless [global options] create [command options] file_name

COMMAND OPTIONS
    --[no-]delete     - Delete the original file after its been imported into the target service. (default: enabled)
    --dump            - Dump the OCR text for the document to the terminal.
    --ocr             - OCR the document if it is a PDF
    --[no-]proc_rules - Process the file through the rules. (default: enabled)
    --prompt          - Open a prompt to rename the file before its processed through the rules.

By default, the original document will be removed after the new note has been created. If you do not want this behavior, you can use the --no-delete option.

If you want to skip the rules processing all together, you can use the --no-proc_rules option.

The --prompt option can be very useful if you have rules that are scoped with the filename. This will open a prompt and allow you to rename the file. Maybe you can add a word or two to ensure some rules get triggered.

The --ocr setting will run the document through the configured OCR engine if the document is a PDF file.

The --dump setting dump the OCR'd text from the document to the terminal.

assign

Assign tags to a note. This command has not been implemented yet.

unassign

Remove tags from a note. This command has not been implemented yet.

search

Search for notes. This command has not been implemented yet.

initconfig

The initconfig command will automatically seed a new paperless.rules.yaml config file with all of the default values. It will not create any rules though. You will have to create those on your own.

NAME
    initconfig - Initialize the config file using current global options

SYNOPSIS
    paperless [global options] initconfig [command options]

DESCRIPTION
    Initializes a configuration file where you can set default options for command line flags, both globally and on a per-command basis. These
    defaults override the built-in defaults and allow you to omit commonly-used command line flags when invoking this program

COMMAND OPTIONS
    --[no-]force - force overwrite of existing config file

editconfig

Use this command to open the paperless.rules.yaml file inside TextEdit.

help

NAME
    help - Shows a list of commands or help for one command

SYNOPSIS
    paperless [global options] help [command options] command

DESCRIPTION
    Gets help for the application or its commands. Can also list the commands in a way helpful to creating a bash-style completion function

COMMAND OPTIONS
    -c - List commands one per line, to assist with shell completion

Global Options

Its recommended that all the global settings be set inside the paperless.rules.yaml file. However, it could be useful to override the settings in the config file via the following global command line options. For an explanation of each setting, you will need to refer to the Configuration File documentation.

The following options would be used most via command line.

--simulate provides you a nice way to test your rules from the command line and verify that documents will end up where you would like.

--rules_file allows you to define a separate rules file than the rules inside the config file. This could be useful if you want to keep multiple sets of rules. Simple set this to the path of the new rules file.

GLOBAL OPTIONS
    --date_default=Date Default - If the date cannot be discovered within the document contents, then use "filedate" or "today" as the default.
                                  (default: filedate)
    --date_format=Date Format   - The default format for the date when inserted using <date> variable. (default: %Y-%m-%d)
    --date_locale=Date Locale   - The locale format of the date: "us" or "euro" (default: us)
    --destination=Notebook      - Default destination to add notes into (default: @Inbox)
    --help                      - Show this message
    --ocr_engine=OCR App        - The name of the app to OCR pdf documents (pdfpen|pdfpenpro|none) (default: pdfpenpro)
    --rules_file=Rules file     - The path to a new rules file. If not defined, the global rules from the config file will be used. (default:
                                  none)
    --service=Services          - The application where the document will be added to. (default: evernote)
    --simulate                  - Only print what would be done. Nothing actually gets modified.
    --text_ext=Text extensions  - A list of file extensions that will be treated as text when added to services like Evernote. (default: txt md
                                  mmd)
    --version                   -
Clone this wiki locally