Easiest, if you have pip:
$ pip install papis
Most of the time I add documents via their DOI. For example, I'll be on IEEExplore or ResearchGate and see a paper that I either want to read or know for sure I'll want to cite. So I simply copy the DOI and run
$ papis add --from doi PASTEDOIHERE
Some references may not have a DOI (like books and papers on arXiv). However, the metadata is almost always available in BiBTeX form (particularly when searcing in Google Scholar, and arXiv has an Export Citation link). In these cases, I copy the BiBTeX data into a new file (usually to ~/Downloads since this folder gets cleaned out and the file created in this step is useless once imported into papis). Then I run
$ papis add --from bibtex NEWREFERENCE.bib
See the files config and header, below. These live in ~/.config/papis and they control the global behavior of papis. To modify these settings for a particular project or folder, you can create a file called .papis.config in said folder and override your global settings and/or set different ones. One of the biggest reasons I end up doing this is because the ieeeconf.cls template pretty much requires pdfLatex (whereas I normally use XeLaTeX). So all of the unicode characters in my databases (e.g. for accents in peoples' names) need to be converted to their LaTeX escape sequences. Fortunately, papis can do this, you just have to tell it to. Below is an example .papis.config file to achieve the desired result.
[settings]
bibtex-unicode = FalseThe header file simply controls how each document appears in the search list when running something like papis open or papis edit.
As shown in the config file, I have a single library called papers which lives in a directory called ~/papers. Every single document I cite (and many that I've just simply read) are in this single library. I cite a lot of the same references in many different papers. So there is a many-to-many relationship between references and projects. In order to associate a reference with a project I make use of the project YAML field which is a list.
I am writing a new paper on pterodactyl migration patterns. I want to cite a paper by Dr. Alan Grant entitled Social Structure of Pterodactyls. So, I'll update the reference in papis by running papis edit grant. The grant part is the query. If the query returns more than one result, I'll have to select the correct paper using the picker. Then I'll edit the YAML file by adding
project:
- pterodactyl-migration
If I've already cited this paper, I can simply append - pterodactyl-migration to the list of projects.
In continuing the previous example, I'm now working on the manuscript and I need to generate a BiBTeX file for the pterodactyl migration project. So I run the following:
$ papis export --all --format bibtex project:pterodactyl-migration > bibliography.bib
So now I have a file called bibliography.bib in my current directory which has all of the references I've associated with the pterodactyl-migration project. I may need to add references to this project later on, in which case I would need to re-run the above command. To make this process easier, I put the command in a script and call it, e.g., updatebib. Make sure to run chmod +x updatebib afterwards so it will be executable. Then, whenever I need my bibliography.bib file to be freshened, just run ./updatebib.
When I'm actively writing, I often times am also re-reading some portions of papers that are particularly relevant. For example, I want to find a specific detail in Dr. Grant's paper, so I simply run papis open grant and select the reference of interest and it will open in a PDF reader.