SPIRES script: Difference between revisions
(future features) |
(temporary update) |
||
Line 1: | Line 1: | ||
SPIRES script is a command line program written in [http://www.python.org/ Python] that accesses information on papers in the [http://www.slac.stanford.edu/spires/ SPIRES] online high energy physics literature database. It can access title, author and [[References with BiBTeX|BiBTeX]] records and update your local [[References with BiBTeX|BiBTeX]] | SPIRES script is a command line program written in [http://www.python.org/ Python] that accesses information on papers in the [http://www.slac.stanford.edu/spires/ SPIRES] online high energy physics literature database. It can access title, author, bibitem and [[References with BiBTeX|BiBTeX]] records and update your local [[References with BiBTeX|BiBTeX]]. A separate program [[#listcitations.py|listcitations.py]] reads through a TeX file and then looks up all the \cite{...} references and outputs the bibitems. | ||
===installation on a GNU/Linux system=== | ===installation on a GNU/Linux system=== | ||
Line 12: | Line 12: | ||
at the command line and see what happens. | at the command line and see what happens. | ||
If python and wget are present | If python and wget are present download the script from [[Image:Spires-0.2.tar| sdfsdfsd sdfsdf ]]. Unpack this tar archive with | ||
<pre> | |||
tar -xvf Spires-0.2.tar | |||
</pre> | |||
You now should have two programs, spires.py and listcitations.py. | |||
To run | To run spires.py type | ||
<pre> | |||
./spires.py hep-th/9711200 | |||
</pre> | |||
or if this doesn't work, try | |||
<pre> | <pre> | ||
python spires.py hep-th/9711200 | python spires.py hep-th/9711200 | ||
Line 21: | Line 30: | ||
===usage=== | ===usage=== | ||
The typical accepted inputs are the usual arXiv references or a SPIRES-style journal reference | The typical accepted inputs are the usual arXiv references, the SPIRES TeX key or a SPIRES-style journal reference | ||
<pre> | <pre> | ||
./spires.py hep-th/9711200 | |||
./spires.py 0705.0303 | |||
./spires.py Maldacena:1997re | |||
./spires.py CMPHA,43,199 | |||
</pre> | </pre> | ||
Line 42: | Line 52: | ||
SLACcitation = "%%CITATION = HEP-TH/9711200;%%" | SLACcitation = "%%CITATION = HEP-TH/9711200;%%" | ||
} | } | ||
Maldacena, Juan M. | Maldacena, Juan M. | ||
The large N limit of superconformal field theories and supergravity | The large N limit of superconformal field theories and supergravity | ||
\cite{Maldacena:1997re} | |||
</pre> | </pre> | ||
To see all the options access the help page | To see all the options access the help page | ||
<pre> | <pre> | ||
tom@fyodor:~$ | tom@fyodor:~$ ./spires.py -h | ||
SPIRES script | SPIRES script | ||
Usage: | Usage: | ||
python spires.py reference [ - | python spires.py reference [ -hbiatcev ] [ --help ] [ --library library.bib ] [ --download download_path/ ] | ||
"reference" must be a standard arXiv reference, e.g. hep-th/9711200 | "reference" must be a standard arXiv reference, e.g. hep-th/9711200, 0705.0303, Maldacena:1997re or a SPIRES journal reference, e.g. CMPHA,43,199 | ||
Options: | Options: | ||
-h, --help | -h, --help | ||
displays this help message | displays this help message | ||
-b | |||
displays the BiBTeX entry | |||
-i | |||
displays the bibitem entry | |||
-a | -a | ||
displays the author(s) | displays the author(s) | ||
-t | -t | ||
displays the title | displays the title | ||
-c | -c | ||
displays the | displays the TeX citation key | ||
-e | -e | ||
displays everything | displays everything | ||
-v | -v | ||
verbose mode | verbose mode | ||
- | |||
--download download_path/ | |||
for arXiv references downloads a pdf of the paper from the arXiv to the directory download_path/ | |||
--library library.bib | --library library.bib | ||
if it is not already in library.bib, appends the BiBTeX entry to library.bib | if it is not already in library.bib, appends the BiBTeX entry to library.bib; use at your own risk | ||
</pre> | </pre> | ||
Each item can be specified individually with switches, e.g. -t for title, -a for authors, -b for BiBTeX entry, -c for | Each item can be specified individually with switches, e.g. -t for title, -a for authors, -b for BiBTeX entry, -c for SPIRES TeX key. For example | ||
<pre> | <pre> | ||
tom@fyodor:~$ python spires.py hep-th/9711200 -at | tom@fyodor:~$ python spires.py hep-th/9711200 -at | ||
Line 90: | Line 100: | ||
</pre> | </pre> | ||
===listcitations.py=== | |||
===future features=== | ===future features=== | ||
* | * Aliases in listcitations.py | ||
===comments and bugs=== | ===comments and bugs=== | ||
If you have any comments or find bugs, please contact [[User:Tom|Tom]]. | If you have any comments or find bugs, please contact [[User:Tom|Tom]]. | ||
===licence=== | ===licence=== | ||
This script is Copyright 2007 Tom Brown and made available under the [http://www.gnu.org/copyleft/gpl.html GNU General Public Licence]. | This script is Copyright 2007 Tom Brown and made available under the [http://www.gnu.org/copyleft/gpl.html GNU General Public Licence]. |
Revision as of 19:01, 6 July 2007
SPIRES script is a command line program written in Python that accesses information on papers in the SPIRES online high energy physics literature database. It can access title, author, bibitem and BiBTeX records and update your local BiBTeX. A separate program listcitations.py reads through a TeX file and then looks up all the \cite{...} references and outputs the bibitems.
installation on a GNU/Linux system
The script requires the python interpreter and wget to be installed on your system. These are automatically installed on most GNU/Linux distributions, but check they are there by typing
python
and
wget
at the command line and see what happens.
If python and wget are present download the script from File:Spires-0.2.tar. Unpack this tar archive with
tar -xvf Spires-0.2.tar
You now should have two programs, spires.py and listcitations.py.
To run spires.py type
./spires.py hep-th/9711200
or if this doesn't work, try
python spires.py hep-th/9711200
usage
The typical accepted inputs are the usual arXiv references, the SPIRES TeX key or a SPIRES-style journal reference
./spires.py hep-th/9711200 ./spires.py 0705.0303 ./spires.py Maldacena:1997re ./spires.py CMPHA,43,199
If no options are specified all possible outputs will be displayed
tom@fyodor:~$ python spires.py hep-th/9711200 @Article{Maldacena:1997re, author = "Maldacena, Juan M.", title = "The large N limit of superconformal field theories and supergravity", journal = "Adv. Theor. Math. Phys.", volume = "2", year = "1998", pages = "231-252", eprint = "hep-th/9711200", SLACcitation = "%%CITATION = HEP-TH/9711200;%%" } Maldacena, Juan M. The large N limit of superconformal field theories and supergravity \cite{Maldacena:1997re}
To see all the options access the help page
tom@fyodor:~$ ./spires.py -h SPIRES script Usage: python spires.py reference [ -hbiatcev ] [ --help ] [ --library library.bib ] [ --download download_path/ ] "reference" must be a standard arXiv reference, e.g. hep-th/9711200, 0705.0303, Maldacena:1997re or a SPIRES journal reference, e.g. CMPHA,43,199 Options: -h, --help displays this help message -b displays the BiBTeX entry -i displays the bibitem entry -a displays the author(s) -t displays the title -c displays the TeX citation key -e displays everything -v verbose mode --download download_path/ for arXiv references downloads a pdf of the paper from the arXiv to the directory download_path/ --library library.bib if it is not already in library.bib, appends the BiBTeX entry to library.bib; use at your own risk
Each item can be specified individually with switches, e.g. -t for title, -a for authors, -b for BiBTeX entry, -c for SPIRES TeX key. For example
tom@fyodor:~$ python spires.py hep-th/9711200 -at Maldacena, Juan M. The large N limit of superconformal field theories and supergravity
If you have a BiBTeX database file such as library.bib then the script can update the file with the BiBTeX entry if it is not already present
python spires.py hep-th/9711200 --library library.bib
listcitations.py
future features
- Aliases in listcitations.py
comments and bugs
If you have any comments or find bugs, please contact Tom.
licence
This script is Copyright 2007 Tom Brown and made available under the GNU General Public Licence.