PAPIS-ADD(1)

NAME
papis-add - add command

The add command is one of the central commands of the papis command line interface. It is a very versatile command with a fair amount of options.

There are also customization settings availabe for this command, check out the configuration page for add.

EXAMPLES

•   Add a document located in ~/Documents/interesting.pdf and name the folder where it will be stored in the database interesting-paper-2021

    papis add ~/Documents/interesting.pdf \
        --folder-name interesting-paper-2021

    if you want to add directly some key values, like author, title and tags, you can also run the following:

    papis add ~/Documents/interesting.pdf \
        --folder-name interesting-paper-2021 \
        --set author 'John Smith' \
        --set title 'The interesting life of bees' \
        --set year 1985 \
        --set tags 'biology interesting bees'

•   Add a paper that you have locally in a file and get the paper information through its doi identifier (in this case 10.10763/1.3237134 as an example):

    papis add ~/Documents/interesting.pdf --from doi 10.10763/1.3237134

•   Add paper to a library named machine-learning from arxiv.org

    papis -l machine-learning add \
        --from url https://arxiv.org/abs/1712.03134

•   If you do not want copy the original pdfs into the library, you can also tell papis to just create a link to them, for example

    papis add --link ~/Documents/interesting.pdf \
        --from doi 10.10763/1.3237134

    will add an entry into the papis library, but the pdf document will remain at ~/Documents/interesting.pdf, and in the document's folder there will be a link to ~/Documents/interesting.pdf instead of the file itself. Of course you always have to be sure that the document at ~/Documents/interesting.pdf does not disappear, otherwise you will end up without a document to open.

•   Papis also tries to make sense of the inputs that you have passed to the command, for instance you could provide only a doi and papis will try to know if this is indeed a doi

    papis add 10.1103/PhysRevLett.123.156401

    or from a url

    papis add https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.123.156401

EXAMPLES IN PYTHON

There is a python function in the add module that can be used to interact in a more effective way in python scripts,

papis.commands.add.run(paths, data={}, folder_name=None, file_name=None, subfolder=None, confirm=False, open_file=False, edit=False, git=False, link=False)

Parameters

•   paths ([]) -- Paths to the documents to be added

•   data (dict) -- Data for the document to be added. If more data is to be retrieved from other sources, the data dictionary will be updated from these sources.

•   folder_name (str) -- Name of the folder where the document will be stored

•   file_name (str) -- File name of the document's files to be stored.

•   subfolder (str) -- Folder within the library where the document's folder should be stored.

•   confirm (bool) -- Wether or not to ask user for confirmation before adding.

•   open_file (bool) -- Wether or not to ask user for opening file before adding.

•   edit (bool) -- Wether or not to ask user for editing the infor file before adding.

•   git (bool) -- Wether or not to ask user for committing before adding, in the case of course that the library is a git repository.

CLI

  papis add

Add a document into a given library

papis add [OPTIONS] [FILES]...

Options

-h, --help
    Show this message and exit.

-s, --set <set_list>
    Set some information before

-d, --subfolder <subfolder>
    Subfolder in the library

--folder-name <folder_name>
    Name for the document's folder (papis format)

--file-name <file_name>
    File name for the document (papis format)

--from <from_importer>
    Add document from a specific importer (pdf2doi, yaml, crossref, folder, pmid, arxiv, lib, bibtex, doi, pdf2arxivid)

-b, --batch
    Batch mode, do not prompt or otherwise

--confirm, --no-confirm
    Ask to confirm before adding to the collection

--open, --no-open
    Open file before adding document

--edit, --no-edit
    Edit info file before adding document

--link, --no-link
    Instead of copying the file to the library, create a link toits original location

--git, --no-git
    Git add and commit the new document

--list-importers, --li
    List all available papis importers

    Arguments

FILES
    Optional argument(s)

AUTHOR
Alejandro Gallo

COPYRIGHT
2017, Alejandro Gallo