From bd872e807d932a1e9922de09ba0a9f945a593270 Mon Sep 17 00:00:00 2001 From: Olivier Mangin Date: Wed, 2 Aug 2017 20:33:54 -0400 Subject: [PATCH 1/4] Lowercase license file. --- LICENSE => license | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename LICENSE => license (100%) diff --git a/LICENSE b/license similarity index 100% rename from LICENSE rename to license From a286b118f43c1131cc9fd3547c6c85db5f0fab8c Mon Sep 17 00:00:00 2001 From: Olivier Mangin Date: Wed, 2 Aug 2017 20:35:51 -0400 Subject: [PATCH 2/4] Improves instructions in README. --- readme.md | 39 ++++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/readme.md b/readme.md index 074bde9..1a060e2 100644 --- a/readme.md +++ b/readme.md @@ -15,15 +15,23 @@ Pubs is built with the following principles in mind: ## Installation -Currently, the Pypi version is outdated. You can install the development version of `pubs`, which should be stable, with: +You can install the latest stable version of `pubs` through Pypi, with: - pip install --upgrade git+https://github.com/pubs/pubs + pip install pubs + +Alternatively, you can: -If `pubs` is already installed, you can upgrade with: + - install the latest development version with pip: pip install --upgrade git+https://github.com/pubs/pubs -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 @@ -51,19 +59,13 @@ or an ISBN (dashes are ignored): ## References always up-to-date -If you use latex, you can automatize references, by creating a bash script with: - - #!/bin/bash - pubs export > references.bib - latex manuscript.tex - bibtex manuscript - latex manuscript.tex +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: 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 @@ -75,19 +77,20 @@ You can attach a document to a reference: And open your documents automatically from the command line: pubs doc open Loeb_2012 + pubs doc open --with lp Loeb_2012 # Opens the document with `lp` to actually print it. ## Customization 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]] 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 second starts with a bang: `!`, and is treated as a shell command. +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`. ## Autocompletion @@ -112,6 +115,8 @@ You can access the self-documented configuration by using `pubs conf`, and all t ## Requirements - python >= 2.7 or >= 3.3 +- [bibtexparser](https://github.com/sciunto-org/python-bibtexparser) +- [beautifulsoup4](https://www.crummy.com/software/BeautifulSoup) - [argcomplete](https://argcomplete.readthedocs.io) (optional, for autocompletion) ## Authors From 6cccc021f8256c142882ab9734aa2600b3ffacad Mon Sep 17 00:00:00 2001 From: "Fabien C. Y. Benureau" Date: Sun, 6 Aug 2017 00:51:56 +0200 Subject: [PATCH 3/4] Minor fix for isbn2index docstring --- pubs/apis.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubs/apis.py b/pubs/apis.py index 0a0e449..0812ba5 100644 --- a/pubs/apis.py +++ b/pubs/apis.py @@ -17,7 +17,7 @@ def doi2bibtex(doi): def isbn2bibtex(isbn): - """Return a bibtex string of metadata from a DOI""" + """Return a bibtex string of metadata from an ISBN""" url = 'http://www.ottobib.com/isbn/{}/bibtex'.format(isbn) r = requests.get(url) From b63a132ac452b3ac46456b444c781074c981b925 Mon Sep 17 00:00:00 2001 From: Olivier Mangin Date: Wed, 2 Aug 2017 20:36:08 -0400 Subject: [PATCH 4/4] Version update. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 8195434..93d7622 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup, find_packages -VERSION = '0.6.0' +VERSION = '0.7.0' setup( name = 'pubs',