Package: pubs
PubsPubs brings your bibliography to the command line.Pubs organizes your scientific papers together with their bibliographic data and provides command line access to basic and advanced manipulation of your library.Pubs is built with the following principles in mind:all papers are referenced using unique citation keys,bibliographic data—bibtex information—is kept separated from metadata such as links to pdf or tags.everything is stored in plain text so it can be manually edited or version controlled.Pubs is currently being maintained, rather than developed aggressively. We add small features,
correct bugs, but have no short-term plans to add major features to it. Pubs does most of what it
is supposed to do: help us do science, so now we are mostly doing that.Notice:pubs is relatively stable but comes with no warranty; do keep backups of your data.Notice:pubs currently works with Python 2.7, but support is being dropped (tests are not run anymore).InstallationYou can install the latest stable version ofpubsthrough Pypi, with:pipinstallpubsAlternatively, you can:install the latest development version with pip:pipinstall--upgradegit+https://github.com/pubs/pubsclone the repository and install it manually:gitclonehttps://github.com/pubs/pubscdpubs
pythonsetup.pyinstall[--user]Arch Linux users can also use thepubs-gitAUR package.Getting startedCreate your library (by default, goes to~/.pubs/).pubsinitImport existing data from bibtex (pubs will try to automatically copy documents defined as 'file' in bibtex):pubsimportpath/to/collection.bibor for a .bib file containing a single reference:pubsaddreference.bib-darticle.pdfpubs can also automatically retrieve the bibtex from a doi:pubsadd-D10.1007/s00422-012-0514-6-darticle.pdfor an ISBN (dashes are ignored):pubsadd-I978-0822324669-darticle.pdfor an arXiv id (automatically downloading arXiv article is in the works):pubsadd-Xmath/9501234-darticle.pdfReferences always up-to-dateIf you use latex, you can automatize references, by runningpubs export > references.bibeach time you update your library, which also fits well as amakefilerule.This ensures that your reference file is always up-to-date; you can cite a paper in your manuscript a soon as you add it in pubs. This means that if you have, for instance, a DOI on a webpage, you only need to do:pubsadd-D10.1007/s00422-012-0514-6and then add\cite{Loeb_2012}in your manuscript. After exporting the bibliography, the citation will correctly appear in your compiled pdf.Document managementYou can attach a document to a reference:pubsdocaddLoeb2012_downloaded.pdfLoeb_2012And open your documents automatically from the command line:pubsdocopenLoeb_2012
pubsdocopen--withlpLoeb_2012# Opens the document with `lp` to actually print it.VersioningPubs comes with a git plugin that automatically commits your changes. You only need to activate it in your configuration:[plugins]active=git,You can then also conveniently interact with the git repository by usingpubs git <regular git commands>.Multiple pubs RepositoriesYou may want to have different pubs repositories, for different projects. To create an alternate repository:pubs--config/path/to/configinit--pubsdir/path/to/desired_repository_directoryThe configuration file and repository will be automatically created.Then you can add papers to the new repository:pubs--config/path/to/configadd-D10.1007/s00422-012-0514-6A useful thing might be to define an alias in your shell:aliaspubs2="pubs --config /path/to/config"and then usepubs2as you would usepubsdirectly.  Note that you cannot use the alias plugin below to do this.CustomizationPubs is designed to interact well with your command line tool chain.
You can add custom commands to pubs by defining aliases in your configuration file (make sure that the alias plugin is activated in your configuration by usingpubs conf).[[alias]]evince=open --with evincecount=!pubs list -k "$@" | wc -lThe first configuration line defines a new subcommand:pubs open --with evincewill be executed whenpubs evinceis typed.
The second starts with a bang:!, which means that it is treated as a shell command. If other arguments are provided they are passed to the shell command as in a script. In the example above thecountalias can take arguments that are passed over to thepubs list -kcommand, hence enabling filters likepubs count year:2012.AutocompletionFor autocompletion to work, you need theargcompletePython package, and Bash 4.2 or newer. For activatingbashortschcompletion, consult theargcomplete documentation.Forzshcompletion, the global activation is not supported but bash completion compatibility can be used for pubs. For that, add the following to your.zshrc:# Enable and load bashcompinitautoload-Uzcompinitbashcompinit
compinit
bashcompinit# Argcomplete explicit registration for pubseval"$(register-python-argcompletepubs)"Need more help ?You can access the self-documented configuration by usingpubs conf, and all the commands' help is available with the--helpoption. Did not find an answer to your question? Drop us an issue. We may not answer right away (science comes first!) but we'll eventually look into it.AuthorsCreatorsFabien BenureauOlivier ManginContributorsJonathan GrizouArnold SykoschTyler EarnestDennis WilsonBill FlynnKyle SundenShane StoneAmlesh SivananthamDV KlopfensteinbeuerleJonáš KulhánekDominik StańczakGustavo José de SousaFlorian RichouxMitsuhiro Nakamura