Add
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 a few customization settings available for this command, which are described on 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 databaseinteresting-paper-2021
papis add ~/Documents/interesting.pdf \ --folder-name interesting-paper-2021
if you want to directly add some metadata, 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 with a locally stored 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
fromarxiv.org
papis -l machine-learning add \ --from arxiv 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
. 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 file.Papis also tries to make sense of the inputs that you have passed on the command-line. For instance you could provide only a DOI and Papis will figure out if this is indeed a DOI and download available metadata using Crossref. For example, you can try
papis add 10.1103/PhysRevLett.123.156401
Similarly, a wide array of known journal are recognized by URL, so you can try:
papis add journals.aps.org/prl/abstract/10.1103/PhysRevLett.123.156401 papis add https://arxiv.org/abs/1712.03134
You can also download citations alongside the information on the paper if the metadata contains a DOI identifier. You can pass the
--fetch-citations
flag in order to create acitations.yaml
file in the document’s main folder with a list of citations. You can check out thepapis citations
command for more advanced usage.BibTeX can be imported directly as a string, or read from a local file or from a remote URL. The following all work:
papis add --from bibtex someFile.bib papis add --from bibtex "https://example.com/someFile.bib" papis add --from bibtex "@book{someReference, author = {John Doe}, ...more fields... }" papis add --from bibtex "$(xclip -o)"
Command-line Interface
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
- -p, --pick-subfolder
Pick from existing subfolders
- --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 (arxiv, bibtex, crossref, dblp, doi, folder, isbn, lib, pdf2arxivid, pdf2doi, pmid, yaml, zenodo)
- -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 to its original location
- --move, --no-move
Instead of copying the file to the library, move it from its original location
- --auto-doctor, --no-auto-doctor
Apply papis doctor to newly added documents.
- --git, --no-git
Git add and commit the new document
- --download-files, --no-download-files
Download file with importer if available or not
- --fetch-citations, --no-fetch-citations
Fetch citations from a DOI (Digital Object Identifier)
Arguments
- FILES
Optional argument(s)