Papis – A Command-line Based Document And Bibliography Manager
A while ago, we wrote about Mendeley – an academic social network for researchers and educators. Using Mendeley, the researchers, lecturers, educators and librarians can connect with each other, share data, discuss ideas about their research, follow inspirational researchers around the world, collaborate and lots more. Today, we are going to discuss yet another useful tool for research scholars. Meet Papis, a powerful and highly extensible command-line based document and bibliography manager. Unlike Mendeley, Papis is not just for a particular research community but for every one who wants to manage their documents easily as well as effectively. Further more, you can retain the full ownership to your data, because all data will be stored in your local drive.
Concerning about the features of Papis, we can list the following;
- Synchronize your documents using git, dropbox, rsync, OwnCloud, Google Drive etc.
- No sign-up or account on any websites required to share libraries with your colleagues.
- Download directly paper information from DOI number via Crossref.
- Download papers from Sci-Hub and add them to your library with all the relevant information in seconds.
- Import your existing documents from Zotero and other managers.
- Create custom scripts or use existing scripts provided by Papis to help you achieve great tasks easily. For example, you can use papis-mail script to send your papers to fellow researchers or to your guides.
- Export documents into many formats such as bibtex, yaml.
- Free, open source and Command-line based tool.
Papis installation isn’t that hard as you may think. The easiest method to install it is using PIP. Also, make sure you have installed the following prerequisites in your Linux box.
- Python 3
These packages are available in the default repositories of most Linux distributions, so you can install them using the default package manager. For example, run the following command to install them on your Ubuntu and derivatives.
$ sudo apt-get install python3 python3-ncurses python3-setuptools
Once the perquisites are installed, run the following command to install Papis.
$ sudo pip3 install papis
Done! Of course there are other installation methods available if you don’t like to use pip3. Check the official installation page for more details.
Papis usage isn’t difficult either, however a basic command line knowledge is required.
Add documents to Library
I already have a couple pdf documents in my local drive.
To add a document to your library (which will be automatically created), run:
$ papis add Docker.pdf --author "Senthil Kumar" --title "Docker Cookbook" --confirm Creating configuration folder in /home/sk/.config/papis Really add? (Y/n): y
As you see in the above example, I have added a pdf document named “Docker.pdf”. Also, we have used three flags namely “–author”, “–title”, and “–confirm”. The “–author” flag will guide papis to use “Senthil Kumar” as the author’s name, “–tittle” flag will tell papis to use “Docker Cookbook” as the document’s title and “–confirm” flag will tell Papis to ask confirmation before adding the document to the library. You can skip the “–confirm” flag if you don’t want papis to prompt any confirmation before adding a document. You can all available for the flag “add” by running the following command:
$ papis add --help
All documents will be stored in the library folder ~/Documents/papers/ by default.
Also, you will see a file called “info.yaml” that contains details of your newly added document. Here is the sample output of my info.yaml file.
author: Kumar files: - Computer-security.pdf title: Computer Security Tips
Opening a document
After adding all documents, run the following command to open the added documents.
$ papis open
If you have only one document in your library, the above command will automatically open file in a respective file viewer. For example if it is a pdf file, then document it will be opened in the default pdf viwer. If it is a doc file, it will be be opened in the default word document editor.
If there are more than one document in the library, use UP/DOWN arrows to choose a document of your choice and hit ENTER key to open it.
As you see in the above output, I have three files in library.
To list all available files, run:
$ papis list /home/sk/Documents/papers/b62a781b36b3605228fe8203107c76b5-Senthil /home/sk/Documents/papers/cfbb9807a1f2974ba5d1ffd650096805-Senthil-Kumar /home/sk/Documents/papers/3bed30833f4618abc7283403854a34c0-Kumar
Creating new library
Like I already mentioned, all documents will be added to the library folder ~/Documents/papers/ by default. You can, however, change it if you want to.
To do so, edit ~/.config/papis/config file:
$ vi ~/.config/papis/config
And change the library folder path. Here is the contents of default config file.
[papers] dir = ~/Documents/papers [settings] default-library = papers
You can either change the path of the default library folder or create new libraries for each category. For example, if you want to add videos, add the following directive in your config file.
[videos] dir = ~/Documents/videos
We can open documents using few GUIs as listed below.
- –tk – Tk based UI
- –vim – VIM based UI
- –rofi – Rofi based UI.
To open tk UI, run:
$ papis open --tk
You will see a screen something like below. Use the UP/DOWN arrows to choose the documents.
That’s it. At this stage, you might have a basic understanding of Papis utility. I wouldn’t claim it is fully completed guide, but it is just enough to get you started using papis. For more details about Papis usage, refer the help section by running the following command:
$ papis -h
You can also refer help section for individual commands. For example, to know more about “list” command, just run:
$ papis list -h
There is also a detailed official guide that covers all aspects of Papis.
And, that’s all. I hope this helps.
More good stuffs to come. Stay tuned!