Config

The config command allows you to query the settings used by Papis on your system.

Examples

The config command returns the value used by Papis. Therefore, if you have not customized some setting, it will return the default value. In contrast, if you have customized it, it will return the value set in the configuration file. For example, to find out to what your “default-library” is set to, call:

papis config default-library

The config command can also be used to query a settings’ default value. This is done by adding the --default flag. This ignores all settings set in your Papis configuration file (note, however, that settings set in a config.py script can count as default values). Check the default “default-library” with:

papis config --default default-library

Settings from a specific section in the configuration file can also be accessed. To take an example, the papis bibtex command’s settings can be accessed with:

papis config --section bibtex
papis config --default --section bibtex

or with papis config (without the section argument) to show the settings available for all the known sections.

You can also query a specific setting within a section. For example like this:

papis config --section bibtex default-read-bibfile
papis config --default --section bibtex default-read-bibfile

Alternatively, you can also use the <section.setting> format to query the value of a setting in a specific section:

papis config bibtex.default-read-bibfile
papis config --default bibtex.default-read-bibfile

For some more advanced usage, we can also query multiple settings at once. Here, sections specified with <section>.<setting> override the section specified by --setting <section>. This can be achieved by:

papis config --section sec1 key1 key2 key3 sec2.key4 sec3.key5

You can find a list of all available settings in the configuration section at General settings. Commands and other plugins can define their own settings, which are documented separately.

Command-line Interface

Print configuration values

papis config [OPTIONS] [OPTIONS]...

Options

-h, --help

Show this message and exit.

-s, --section <section>

select a default section for the options

-d, --default

List default configuration setting values, instead of those in the configuration file

--json

Print settings in a JSON format

Arguments

OPTIONS

Optional argument(s)