From 29e8fecfa9c7bdd991ef231a8fb1d250d9ebd8a9 Mon Sep 17 00:00:00 2001 From: Olivier Mangin Date: Tue, 2 Feb 2021 22:03:33 -0800 Subject: [PATCH] Minor readme fixes. --- readme.md | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/readme.md b/readme.md index cf1fdff..446a8ad 100644 --- a/readme.md +++ b/readme.md @@ -20,19 +20,19 @@ is supposed to do: help us do science, so now we are mostly doing that. ## Installation You can install the latest stable version of `pubs` through Pypi, with: - ``` + ```shell pip install pubs ``` Alternatively, you can: - install the latest development version with pip: - ``` + ```shell pip install --upgrade git+https://github.com/pubs/pubs ``` - clone the repository and install it manually: - ``` + ```shell git clone https://github.com/pubs/pubs cd pubs python setup.py install [--user] @@ -44,32 +44,32 @@ Arch Linux users can also use the [pubs-git](https://aur.archlinux.org/packages/ ## Getting started Create your library (by default, goes to `~/.pubs/`). - ``` + ```shell pubs init ``` Import existing data from bibtex (pubs will try to automatically copy documents defined as 'file' in bibtex): - ``` + ```shell pubs import path/to/collection.bib ``` or for a .bib file containing a single reference: - ``` + ```shell pubs add reference.bib -d article.pdf ``` pubs can also automatically retrieve the bibtex from a doi: - ``` + ```shell pubs add -D 10.1007/s00422-012-0514-6 -d article.pdf ``` or an ISBN (dashes are ignored): - ``` + ```shell pubs add -I 978-0822324669 -d article.pdf ``` or an arXiv id (automatically downloading arXiv article is in the works): - ``` + ```shell pubs add -X math/9501234 -d article.pdf ``` @@ -79,7 +79,7 @@ or an arXiv id (automatically downloading arXiv article is in the works): 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. 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: - ``` + ```shell pubs add -D 10.1007/s00422-012-0514-6 ``` @@ -89,12 +89,12 @@ and then add `\cite{Loeb_2012}` in your manuscript. After exporting the bibliogr ## Document management You can attach a document to a reference: - ``` + ```shell pubs doc add Loeb2012_downloaded.pdf Loeb_2012 ``` And open your documents automatically from the command line: - ``` + ```shell pubs doc open Loeb_2012 pubs doc open --with lp Loeb_2012 # Opens the document with `lp` to actually print it. ``` @@ -114,18 +114,18 @@ You can then also conveniently interact with the git repository by using `pubs g ## Multiple pubs Repositories You may want to have different pubs repositories, for different projects. To create an alternate repository: - ``` + ```shell pubs --config /path/to/config init --pubsdir /path/to/desired_repository_directory ``` The configuration file and repository will be automatically created. Then you can add papers to the new repository: - ``` + ```shell pubs --config /path/to/config add -D 10.1007/s00422-012-0514-6 ``` A useful thing might be to define an alias in your shell: - ``` + ```shell alias pubs2="pubs --config /path/to/config" ``` and then use `pubs2` as you would use `pubs` directly. Note that you cannot use the alias plugin below to do this. @@ -141,8 +141,8 @@ You can add custom commands to pubs by defining aliases in your configuration fi count = !pubs list -k "$@" | wc -l ``` -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. 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`. +The first configuration line defines a new subcommand: `pubs open --with evince` will be executed when `pubs evince` is 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 the `count` alias can take arguments that are passed over to the `pubs list -k` command, hence enabling filters like `pubs count year:2012`. ## Autocompletion