Alternatively Arch Linux users can also use the [pubs-git](https://aur.archlinux.org/packages/pubs-git/) AUR package.
- clone the repository and install it manually:
git clone https://github.com/pubs/pubs
cd pubs
python setup.py install [--user]
Arch Linux users can also use the [pubs-git](https://aur.archlinux.org/packages/pubs-git/) AUR package.
## Getting started
## Getting started
@ -51,19 +59,13 @@ or an ISBN (dashes are ignored):
## References always up-to-date
## References always up-to-date
If you use latex, you can automatize references, by creating a bash script with:
If you use latex, you can automatize references, by running `pubs export > references.bib` each time you update your library, which also fits well as a `makefile` rule.
#!/bin/bash
pubs export > references.bib
latex manuscript.tex
bibtex manuscript
latex manuscript.tex
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:
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:
pubs add -D 10.1007/s00422-012-0514-6
pubs add -D 10.1007/s00422-012-0514-6
and then add `\cite{Loeb_2012}` in your manuscript. After running the bash script, the citation will correctly appear in your compiled pdf.
and then add `\cite{Loeb_2012}` in your manuscript. After exporting the bibliography, the citation will correctly appear in your compiled pdf.
## Document management
## Document management
@ -75,19 +77,20 @@ You can attach a document to a reference:
And open your documents automatically from the command line:
And open your documents automatically from the command line:
pubs doc open Loeb_2012
pubs doc open Loeb_2012
pubs doc open --with lp Loeb_2012 # Opens the document with `lp` to actually print it.
## Customization
## Customization
Pubs is designed to interact well with your command line tool chain.
Pubs is designed to interact well with your command line tool chain.
You can add custom commands to pubs by defining aliases in your config file (make sure that the alias plugin is activated in your configuration by using `pubs conf`).
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 using `pubs conf`).
[[alias]]
[[alias]]
evince = open --with evince
evince = open --with evince
count = !pubs list -k | wc -l
count = !pubs list -k "$@" | wc -l
The first command defines a new subcommand: `pubs open -w evince` will be executed when `pubs evince` is typed.
The first command defines a new subcommand: `pubs open --with evince` will be executed when `pubs evince` is typed.
The second starts with a bang: `!`, and is treated as a shell command.
The second starts with a bang: `!`, and 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 the `count` alias can take arguments that are be passed to the `pubs list -k` command, hence enabling filters like `pubs count year:2012`.
## Autocompletion
## Autocompletion
@ -112,6 +115,8 @@ You can access the self-documented configuration by using `pubs conf`, and all t