| 1 |
.\" -*- mode: troff; coding: utf-8 -*- |
| 2 |
.\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) |
| 3 |
.\" |
| 4 |
.\" Standard preamble: |
| 5 |
.\" ======================================================================== |
| 6 |
.de Sp \" Vertical space (when we can't use .PP) |
| 7 |
.if t .sp .5v |
| 8 |
.if n .sp |
| 9 |
.. |
| 10 |
.de Vb \" Begin verbatim text |
| 11 |
.ft CW |
| 12 |
.nf |
| 13 |
.ne \\$1 |
| 14 |
.. |
| 15 |
.de Ve \" End verbatim text |
| 16 |
.ft R |
| 17 |
.fi |
| 18 |
.. |
| 19 |
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. |
| 20 |
.ie n \{\ |
| 21 |
. ds C` "" |
| 22 |
. ds C' "" |
| 23 |
'br\} |
| 24 |
.el\{\ |
| 25 |
. ds C` |
| 26 |
. ds C' |
| 27 |
'br\} |
| 28 |
.\" |
| 29 |
.\" Escape single quotes in literal strings from groff's Unicode transform. |
| 30 |
.ie \n(.g .ds Aq \(aq |
| 31 |
.el .ds Aq ' |
| 32 |
.\" |
| 33 |
.\" If the F register is >0, we'll generate index entries on stderr for |
| 34 |
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index |
| 35 |
.\" entries marked with X<> in POD. Of course, you'll have to process the |
| 36 |
.\" output yourself in some meaningful fashion. |
| 37 |
.\" |
| 38 |
.\" Avoid warning from groff about undefined register 'F'. |
| 39 |
.de IX |
| 40 |
.. |
| 41 |
.nr rF 0 |
| 42 |
.if \n(.g .if rF .nr rF 1 |
| 43 |
.if (\n(rF:(\n(.g==0)) \{\ |
| 44 |
. if \nF \{\ |
| 45 |
. de IX |
| 46 |
. tm Index:\\$1\t\\n%\t"\\$2" |
| 47 |
.. |
| 48 |
. if !\nF==2 \{\ |
| 49 |
. nr % 0 |
| 50 |
. nr F 2 |
| 51 |
. \} |
| 52 |
. \} |
| 53 |
.\} |
| 54 |
.rr rF |
| 55 |
.\" ======================================================================== |
| 56 |
.\" |
| 57 |
.IX Title "bibdoiadd 1" |
| 58 |
.TH bibdoiadd 1 2024-09-02 "" "LATEX CROSSREFWARE" |
| 59 |
.\" For nroff, turn off justification. Always turn off hyphenation; it makes |
| 60 |
.\" way too many mistakes in technical documents. |
| 61 |
.if n .ad l |
| 62 |
.nh |
| 63 |
.SH NAME |
| 64 |
bibdoiadd.pl \- add DOI numbers to papers in a given bib file |
| 65 |
.SH SYNOPSIS |
| 66 |
.IX Header "SYNOPSIS" |
| 67 |
bibdoiadd [\fB\-c\fR \fIconfig_file\fR] [\fB\-C\fR 1|0] [\fB\-e\fR 1|0] [\fB\-f\fR] [\fB\-o\fR \fIoutput\fR] \fIbib_file\fR |
| 68 |
.SH OPTIONS |
| 69 |
.IX Header "OPTIONS" |
| 70 |
.IP "\fB\-c\fR \fIconfig_file\fR" 4 |
| 71 |
.IX Item "-c config_file" |
| 72 |
Configuration file. If this file is absent, some defaults are used. |
| 73 |
See below for its format. |
| 74 |
.IP "\fB\-C\fR 1|0" 4 |
| 75 |
.IX Item "-C 1|0" |
| 76 |
Whether to canonicalize names in the output (1) or not (0). By default, 1. |
| 77 |
.IP \fB\-e\fR 4 |
| 78 |
.IX Item "-e" |
| 79 |
If 1 (default), add empty doi if a doi cannot be found. This prevents |
| 80 |
repeated searches for the same entries if you add new entries to the |
| 81 |
file. Calling \f(CW\*(C`\-e 0\*(C'\fR suppresses this behavior. |
| 82 |
.IP \fB\-f\fR 4 |
| 83 |
.IX Item "-f" |
| 84 |
Force checking doi number even if one is present |
| 85 |
.IP "\fB\-o\fR \fIoutput\fR" 4 |
| 86 |
.IX Item "-o output" |
| 87 |
Output file. If this option is not used, the name for the |
| 88 |
output file is formed by adding \f(CW\*(C`_doi\*(C'\fR to the input file |
| 89 |
.SH DESCRIPTION |
| 90 |
.IX Header "DESCRIPTION" |
| 91 |
The script reads a BibTeX file. It checks whether the entries have |
| 92 |
DOIs. If not, it tries to contact http://www.crossref.org to get the |
| 93 |
corresponding DOI. The result is a BibTeX file with the fields |
| 94 |
\&\f(CW\*(C`doi=...\*(C'\fR added. |
| 95 |
.PP |
| 96 |
The name of the output file is either set by the \fB\-o\fR option or |
| 97 |
is derived by adding the suffix \f(CW\*(C`_doi\*(C'\fR to the output file. |
| 98 |
.PP |
| 99 |
Every BibTeX record in the input is parsed, using BibTeX::Parser, but |
| 100 |
only the ones that do not have the \f(CW\*(C`doi\*(C'\fR field (or \f(CW\*(C`mrnumber\*(C'\fR or |
| 101 |
\&\f(CW\*(C`zblnumber\*(C'\fR for the sibling scripts) are processed. These entries |
| 102 |
without the requested field are written back, as described in |
| 103 |
BibTeX::Parser::Entry. |
| 104 |
.PP |
| 105 |
The bib records that are not processed (because they already have the |
| 106 |
requested field) are written back as-is, without any reformatting. |
| 107 |
.PP |
| 108 |
There are (were?) two options for making queries with Crossref: free |
| 109 |
account and paid membership. In the first case you still must register |
| 110 |
with Crossref and are limited to a small number of queries, see the |
| 111 |
agreement at |
| 112 |
\&\f(CW\*(C`http://www.crossref.org/01company/free_services_agreement.html\*(C'\fR. In |
| 113 |
the second case you have a username and password, and can use them for |
| 114 |
automatic queries. I am not sure whether the use of this script is |
| 115 |
allowed for the free account holders. At any rate, if you want to add |
| 116 |
DOIs to a large number of entries, you should register as a paid member. |
| 117 |
.SH "CONFIGURATION FILE" |
| 118 |
.IX Header "CONFIGURATION FILE" |
| 119 |
The configuration file relates to the Crossref queries, and is mostly |
| 120 |
self-explanatory: it has comments (starting with \f(CW\*(C`#\*(C'\fR) and assginments |
| 121 |
in the form |
| 122 |
.PP |
| 123 |
.Vb 1 |
| 124 |
\& $field = value ; |
| 125 |
.Ve |
| 126 |
.PP |
| 127 |
The important parameters are \f(CW$mode\fR (\f(CW\*(Aqfree\*(Aq\fR or \f(CW\*(Aqpaid\*(Aq\fR), |
| 128 |
\&\f(CW$email\fR (for free users) and \f(CW$username\fR & \f(CW$password\fR for paid |
| 129 |
members. |
| 130 |
.SH EXAMPLES |
| 131 |
.IX Header "EXAMPLES" |
| 132 |
.Vb 2 |
| 133 |
\& bibdoiadd \-c bibdoiadd.cfg \-o \- citations.bib > result.bib |
| 134 |
\& bibdoiadd \-c bibdoiadd.cfg \-o result.bib citations.bib |
| 135 |
.Ve |
| 136 |
.SH AUTHOR |
| 137 |
.IX Header "AUTHOR" |
| 138 |
Boris Veytsman |
| 139 |
.SH "COPYRIGHT AND LICENSE" |
| 140 |
.IX Header "COPYRIGHT AND LICENSE" |
| 141 |
Copyright (C) 2014\-2024 Boris Veytsman |
| 142 |
.PP |
| 143 |
This is free software. You may redistribute copies of it under the |
| 144 |
terms of the GNU General Public License |
| 145 |
<http://www.gnu.org/licenses/gpl.html>. There is NO WARRANTY, to the |
| 146 |
extent permitted by law. |