PAPIS-CONFIG(1)

NAME
papis-config - Papis Configuration

Papis uses a configuration file in INI format. You can then have several libraries which work independently from each other.

For example, maybe you want to have one library for papers and the other for some miscellaneous documents. An example for that is given below

[papers]
dir = ~/Documents/papers
[settings]
editor = vim
default-library = papers
[books]
dir = ~/Documents/books

A more complete example of a configuration file is the following

[settings]
# Open file with rifle, a nice python program
opentool = rifle
# Use gvim as a graphical editor
xeditor = gvim
# Use ranger as a file browser, too a  nice python package
file-browser = ranger
# Ask for confirmation when doing papis add ...
add-confirm = True
# Edit the info.yaml file before adding a doc into the library
# papis add --edit
add-edit = True
# Open the files before adding a document into the library
# papis add --open
add-open = True
# Define custom default match and header formats
match-format = {doc[tags]}{doc.subfolder}{doc[title]}{doc[author]}{doc[year]}
header-format = > {doc[title]:<70.70}|{doc[author]:<20.20} ({doc[year]:-<4})
# Commands that will be run when one does papis run ...
# e.g., papis run gagp will run the command below in the library folder
gagp = git commit -a && git push origin master
gs = git status
gm = git commit
gp = git push
gu = git pull
gma = git commit -a
# Define a lib
[papers]
dir = ~/Documents/papers
# Define a lib for books
[books]
dir = ~/Documents/books
# Define a lib for Videos
[videos]
dir = ~/Videos/courses
# Define a lib for contacts, why not?
# To make it work you just have to define some default settings
[contacts]
dir = ~/contacts/general
mode = contact
header-format = {doc[first_name]} {doc[last_name]}
match-format = {doc[org]} {doc[first_name]} {doc[last_name]}
browse-query-format = {doc[first_name]} {doc[last_name]}
add-open = False
rofi-gui-gui-eh = 2
rofi-gui-header-format = %(header-format)s
                     {doc[tel][cell]}
tk-gui-header-format = %(rofi-gui-header-format)s
vim-gui-header-format = Title: %(header-format)s
                        Tel  : {doc[tel]}
                        Mail : {doc[email]}
                     {doc[empty]}

DEFAULT SETTINGS

  General

mode (config-settings-mode)

•   Default: document

    Papis is a modal program and it can be configured to support different operating modes. The default is considering that every papis document or entry is a ‘document’.

opentool (config-settings-opentool)

•   Default: xdg-open

    This is the general program that will be used to open documents. As for now papis is not intended to detect the type of document to be open and decide upon it how to open the document. You should set this to the right program for the tool. If you are in linux you might want to take a look at ranger or let the default handle it in your system. For mac users you might set this to open.

dir-umask (config-settings-dir-umask)

•   Default: 493

    This is the default umask that will be used to create the new documents’ directories.

browser (config-settings-browser)

•   Default: $BROWSER

    Program to be used for opening websites, the default is the environment variable $BROWSER.

picktool (config-settings-picktool)

•   Default: papis.pick

    This is the program used whenever papis asks you to pick a document or options in general.

Possible options are:

•   papis.pick

•   rofi

•   vim

mvtool (config-settings-mvtool)

•   Default: mv

    Tool used to in the papis mv command to move documents. If you are using git to manage your documents, you might consider setting it to mvtool = git mv.

editor (config-settings-editor)

•   Default: $EDITOR

    Editor used to edit files in papis, for instance for the papis edit command. It defaults to the $EDITOR environment variable, if this is not set then it will default to the $VISUAL environment variable. Otherwise the default editor in your system will be used.

xeditor (config-settings-xeditor)

•   Default: xdg-open

    Sometimes papis might use an editor that uses a windowing system (GUI Editor), you can set this to your prefered gui based editor, e.g.: gedit, xemacs, gvim to name a few.

sync-command (config-settings-sync-command)

•   Default: git -C {lib[dir]} pull origin master

    Command that is to be used when papis sync is run.

notes-name (config-settings-notes-name)

•   Default: notes.tex

    In papis edit you can edit notes about the document. notes-name is the default name of the notes file, which by default is supposed to be a TeX file.

use-cache (config-settings-use-cache)

•   Default: True

    Set to False if you do not want to use the cache for the given library.

cache-dir (config-settings-cache-dir)

•   Default: /home/ale/.cache/papis

use-git (config-settings-use-git)

•   Default: False

    Some commands will issue git commands if this option is set to True. For example in mv or rename.

add-confirm (config-settings-add-confirm)

•   Default: False

    If set to True, everytime you run papis add the flag --confirm will be added automatically. If is set to True and you add it, i.e., you run papis add --confirm, then it will fave the contrary effect, i.e., it will not ask for confirmation.

add-name (config-settings-add-name)

•   Default:
    ``
    ``

    Default name for newly added documents. For example, if you want your documents to be author-title then you should set it to the papis format: {doc[author]}-{doc[title]}.

add-interactive (config-settings-add-interactive)

•   Default: False

    If set to True, everytime you run papis add the flag --interactive will be added automatically. If is set to True and you add it, i.e., you run papis add --interactive, then it will fave the contrary effect, i.e., it will not run in interactive mode.

add-edit (config-settings-add-edit)

•   Default: False

    If set to True, everytime you run papis add the flag --edit will be added automatically. If is set to True and you add it, i.e., you run papis add --edit, then it will fave the contrary effect, i.e., it will not prompt to edit the info file.

add-open (config-settings-add-open)

•   Default: False

    If set to True, everytime you run papis add the flag --open will be added automatically. If is set to True and you add it, i.e., you run papis add --open, then it will fave the contrary effect, i.e., it will not open the attached files before adding the document to the library.

check-keys (config-settings-check-keys)

•   Default: files

    Comma separated key values to be checked by default by the command check. E.g: check-keys = author, doi.

browse-query-format (config-settings-browse-query-format)

•   Default: {doc[title]} {doc[author]}

    The query string that is to be searched for in the browse command whenever a search engine is used.

search-engine (config-settings-search-engine)

•   Default: https://duckduckgo.com

    Search engine to be used by some commands like browse.

user-agent (config-settings-user-agent)

•   Default: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3)

    User agent used by papis whenever it obtains information from external servers.

default-gui (config-settings-default-gui)

•   Default: vim

    Default gui to be used by papis, it can have the values given by papis gui --help.

scripts-short-help-regex (config-settings-scripts-short-help-regex)

•   Default: .*papis-short-help: *(.*)

    This is the format of the short help indicator in external papis commands.

info-name (config-settings-info-name)

•   Default: info.yaml

    The default name of the information files.

doc-url-key-name (config-settings-doc-url-key-name)

•   Default: doc_url

    Some documents might have associated apart from an url also a file url, the key name appearing in the information file is defined by this setting.

file-browser (config-settings-file-browser)

•   Default: xdg-open

    File browser to be used when opening a directory, it defaults to the default file browser in your system, however you can set it to different file browsers such as dolphin, thunar, ranger to name a few.

extra-bibtex-keys (config-settings-extra-bibtex-keys)

•   Default:
    ``
    ``

    When exporting documents in bibtex format, you might want to add non-standard bibtex keys such as doc_url or tags, you can add these here as comma separated values, for example extra-bibtex-keys = tags, doc_url.

extra-bibtex-types (config-settings-extra-bibtex-types)

•   Default:
    ``
    ``

    Allow non-standard bibtex types to be recognised, e.g, extra-bibtex-types = wikipedia, video, song. See bibtex reference.

default-library (config-settings-default-library)

•   Default: papers

    The name of the library that is to be searched when papis is run without library arguments.

export-text-format (config-settings-export-text-format)

•   Default: {doc[author]}. {doc[title]}. {doc[journal]} {doc[pages]} {doc[month]} {doc[year]}

    The default output papis format for papis export --text.

format-doc-name (config-settings-format-doc-name)

•   Default: doc

    This setting controls the name of the document in the papis format strings like in format strings such as match-format or header-format. For instance, if you are managing videos, you might want to set this option to vid in order to set the header-format to {doc[title]} - {doc[director]} - {doc[duration]}.

match-format (config-settings-match-format)

•   Default: {doc[tags]}{doc.subfolder}{doc[title]}{doc[author]}{doc[year]}

    Default format that is used to match a document against in order to select it. For example if the match-format is equal to {doc[year]} {doc[author]} then title of a document will not work to match a document, onlye the year and author.

header-format (config-settings-header-format)

•   Default: {doc[title]:<70.70}|{doc[author]:<20.20} ({doc[year]:-<4})

    Default format that is used to show a document in order to select it.

open-mark (config-settings-open-mark)

•   Default: False

    If this option is set to True, then every time that papis opens a document it will ask to open a mark first. If it is set to False, then doing

    papis open --mark

    will avoid opening a mark.

mark-key-name (config-settings-mark-key-name)

•   Default: marks

    This is the default key name for the marks in the info file, for example if you set mark-key-name = bookmarks then you would have in your info.yaml file

    author: J. Krishnamurti
    bookmarks:
    - name: Chapter 1
      value: 120

mark-format-name (config-settings-mark-format-name)

•   Default: mark

    This is the name of the mark to be passed to the options mark-header-format etc… E.g. if you set mark-format-name = m then you could set mark-header-format = {m[value]} - {m[name]}.

mark-header-format (config-settings-mark-header-format)

•   Default: {mark[name]} - {mark[value]}

    This is the format in which the mark will appear whenever the user has to pick one, you can change this in order to make marks work in the way you like. Per default it is assumed that every mark has a name and a value key, but this you can change.

mark-match-format (config-settings-mark-match-format)

•   Default: {mark[name]} - {mark[value]}

    Format in which the mark name has to match the user input.

mark-opener-format (config-settings-mark-opener-format)

•   Default: xdg-open

    Due to the difficulty to generalize opening a general document at a given bookmark, the user should set this in whichever way it suits their needs. For example

•   If you are using the pdf viewer evince and you want to open a mark, you would use mark-opener-format = evince -p {mark[value]}.

•   If you are using zathura, do mark-opener-format = zathura -P {mark[value]}.

  Vim gui

help-key (config-vim-gui-help-key)

•   Default: h

open-key (config-vim-gui-open-key)

•   Default: o

edit-key (config-vim-gui-edit-key)

•   Default: e

search-key (config-vim-gui-search-key)

•   Default: /

delete-key (config-vim-gui-delete-key)

•   Default: dd

open-dir-key (config-vim-gui-open-dir-key)

•   Default: <S-o>

next-search-key (config-vim-gui-next-search-key)

•   Default: n

prev-search-key (config-vim-gui-prev-search-key)

•   Default: N

header-format (config-vim-gui-header-format)

•

Default:

    Title : {doc[title]}
    Author: {doc[author]}
    Year  : {doc[year]}
    -------

  Tk gui

open (config-tk-gui-open)

•   Default: o

edit (config-tk-gui-edit)

•   Default: e

exit (config-tk-gui-exit)

•   Default: <Control-q>

clear (config-tk-gui-clear)

•   Default: q

help (config-tk-gui-help)

•   Default: h

focus_prompt (config-tk-gui-focus_prompt)

•   Default: :

move_down (config-tk-gui-move_down)

•   Default: j

move_up (config-tk-gui-move_up)

•   Default: k

move_top (config-tk-gui-move_top)

•   Default: g

move_bottom (config-tk-gui-move_bottom)

•   Default: <Shift-G>

print_info (config-tk-gui-print_info)

•   Default: i

half_down (config-tk-gui-half_down)

•   Default: <Control-d>

half_up (config-tk-gui-half_up)

•   Default: <Control-u>

scroll_down (config-tk-gui-scroll_down)

•   Default: <Control-e>

scroll_up (config-tk-gui-scroll_up)

•   Default: <Control-y>

prompt-fg (config-tk-gui-prompt-fg)

•   Default: lightgreen

prompt-bg (config-tk-gui-prompt-bg)

•   Default: black

    Color of the foreground of an entry

entry-fg (config-tk-gui-entry-fg)

•   Default: grey77

    Color of the foreground of an active entry

activeforeground (config-tk-gui-activeforeground)

•   Default: gray99

    Color of the background of an active entry

activebackground (config-tk-gui-activebackground)

•   Default: #394249

insertbackground (config-tk-gui-insertbackground)

•   Default: red

prompt-font-size (config-tk-gui-prompt-font-size)

•   Default: 14

entry-bg-size (config-tk-gui-entry-bg-size)

•   Default: 14

entry-font-size (config-tk-gui-entry-font-size)

•   Default: 14

entry-font-name (config-tk-gui-entry-font-name)

•   Default: Times

entry-font-style (config-tk-gui-entry-font-style)

•   Default: normal

entry-lines (config-tk-gui-entry-lines)

•   Default: 3

entry-bg-odd (config-tk-gui-entry-bg-odd)

•   Default: #273238

entry-bg-pair (config-tk-gui-entry-bg-pair)

•   Default: #273238

cursor (config-tk-gui-cursor)

•   Default: xterm

height (config-tk-gui-height)

•   Default: 1

labels-per-page (config-tk-gui-labels-per-page)

•   Default: 6

borderwidth (config-tk-gui-borderwidth)

•   Default: -1

window-width (config-tk-gui-window-width)

•   Default: 1200

window-bg (config-tk-gui-window-bg)

•   Default: #273238

window-height (config-tk-gui-window-height)

•   Default: 700

match-format (config-tk-gui-match-format)

•   Default: {doc[tags]}{doc.subfolder}{doc[title]}{doc[author]}{doc[year]}

header-format (config-tk-gui-header-format)

•

Default:

    {doc[title]}
    {doc[empty]}   {doc[author]}
    ({doc[year]:->4})

  Rofi gui

key-quit (config-rofi-gui-key-quit)

•   Default: Alt+q

key-edit (config-rofi-gui-key-edit)

•   Default: Alt+e

key-delete (config-rofi-gui-key-delete)

•   Default: Alt+d

key-help (config-rofi-gui-key-help)

•   Default: Alt+h

key-open-stay (config-rofi-gui-key-open-stay)

•   Default: Alt+o

key-normal-window (config-rofi-gui-key-normal-window)

•   Default: Alt+w

key-browse (config-rofi-gui-key-browse)

•   Default: Alt+u

key-open (config-rofi-gui-key-open)

•   Default: Enter

eh (config-rofi-gui-eh)

•   Default: 3

sep (config-rofi-gui-sep)

•   Default: |

width (config-rofi-gui-width)

•   Default: 80

lines (config-rofi-gui-lines)

•   Default: 10

fullscreen (config-rofi-gui-fullscreen)

•   Default: False

normal_window (config-rofi-gui-normal_window)

•   Default: False

fixed_lines (config-rofi-gui-fixed_lines)

•   Default: 20

markup_rows (config-rofi-gui-markup_rows)

•   Default: True

multi_select (config-rofi-gui-multi_select)

•   Default: True

case_sensitive (config-rofi-gui-case_sensitive)

•   Default: False

header-format (config-rofi-gui-header-format)

•

Default:

    <b>{doc[title]}</b>
    {doc[empty]}  <i>{doc[author]}</i>
    {doc[empty]}  <span foreground="red">({doc[year]:->4})</span><span foreground="green">{doc[tags]}</span>

AUTHOR
Alejandro Gallo

COPYRIGHT
2017, Alejandro Gallo