Note that until changes are made for the new API, getpaper needs a rehaul. See the text file.
Download, add bibtex, query bibtex, strip propaganda, print, and/or open papers based on reference!
Here, papers are academic journal articles, usually somehow related to nuclear astrophysics, which is my interest. It mainly relies on the SAO/NASA Astrophysics Data System (ADS) and would typically take queries following the Journal/Volume/Page format. In a full blown operation, here is what happens:
- You feed
getpapersome options, including a journal name, a volume, and a page number getpaperchecks if ADS has a matching query (and if there are multiple returns, prompts you to choose one)getpaperchecks if you have a matching bibkey in your library.bib file, so as not to duplicategetpaperchecks the expected output PDF file name, so as not to download for no reason- If it was instructed to open the paper, it would open the paper you already had but forgot you downloaded
- Finding that you do not have this paper, it will generate a full bibtex entry, including the abstract
getpaperwill download the paper (if you have subscription access)getpapercan let you handle captchas at APSgetpaperwill ensure that what was downloaded looks like a legitimate PDF and not rubbishgetpaperwill strip the first page of the PDF if it's nonsense about the online journal with your IP addressgetpaperwill link the downloaded location of the paper into the bibtex entrygetpaperwill create a sensible directory structure like articles/2013 to place the paper if neededgetpaperwill open the paper if you asked it togetpaperwill print the paper if you asked it to (please have an idea of the page length first!)
If you didn't have subscription access, perhaps because you are at home or travelling...
getpapercan accept an SSH user and host to a machine at your work, and use that server to transparently download and transfer the paper to your local machine (though you should set up passwordless SSH and ensure your work machine has the right tools). However, I have been unable to test or bugcheck this option for several years owing to firewalls. Thus you can expect particularly APS journals would not work at the very least.
And it will do all that, with a simple, single command. That could save you at least sixty seconds doing it yourself!
What it will not do:
- Harvest papers blindly. You need to feed it the relevant Journal/Volume/Page information yourself. This is to comply with the online journals' TOS. It keeps you from clicking the mouse, not from never connecting to the internet ever again by downloading the Library of Alexandria.
You probably want to be using JabRef to manage your library.bib file. It's awesome...
getpaper is just a single shell script. While it needs a run configuration file, it will initialize one for you the first time you run it. Many of the features are possible owing to lovely free software. Although getpaper checks for the dependencies it requires itself, here is a list with a brief description:
- lynx: A scriptable, command-line driven web browser. This must be compiled with the enable-externs option.
- wget: A non-interactive downloading tool.
- pdfinfo: Part of poppler or xpdf,
getpaperuses this to validate a download as being a pdf. - pdftk: PDF Toolkit, used to remove any propaganda pages.
- imagemagick: A versatile image tool, it is used for the APS Captcha rendering.
- zenity: A pop-up tool handy for simple GUIs in shell scripts.
It also requires the common system tools: grep, sed, and awk.