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 --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 \
        --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.

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={}, name=None, file_name=None, subfolder=None, interactive=False, confirm=False, open_file=False, edit=False, commit=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.

•   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.

•   interactive (bool) -- Wether or not interactive functionality of this command should be activated.

•   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.

•   commit (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.INDENT 0.0

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

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

-d, --dir <directory>
    Subfolder in the library

-i, --interactive, --no-interactive
    Do some of the actions interactively

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

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

--from-bibtex <from_bibtex>
    Parse information from a bibtex file

--from-yaml <from_yaml>
    Parse information from a yaml file

--from-folder <from_folder>
    Add document from folder being a valid papis document (containing info.yaml)

--from-url <from_url>
    Get document and information from agiven url, a parser must be implemented

--from-doi <from_doi>
    Doi to try to get information from

--from-pmid <from_pmid>
    PMID to try to get information from

--from-lib <from_lib>
    Add document from another library

--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

--commit, --no-commit
    Commit document if library is a git repository

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

--no-document
    DEPRECATION NOTICE: This option is no longer valid, it will be removed in future releases Arguments.INDENT 0.0

FILES
    Optional argument(s)

AUTHOR
Alejandro Gallo

COPYRIGHT
2017, Alejandro Gallo