aboutsummaryrefslogtreecommitdiffstats
path: root/man/bib-convert.1
blob: ce14279e70d7903a6938682ad24d87e9c53ad914 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
.TH BIB-CONVERT 1 "June 2026" "bibutils" "User Commands"
.SH NAME
bib-convert \- convert between bibtex and refer database formats
.SH SYNOPSIS
.B bib-convert
.RB [ \-b
|
.BR \-r ]
.RI [ file ]
.SH DESCRIPTION
.B bib-convert
reads a bibliographic database from
.I file
(or standard input) and writes it on standard output in the other
format: bibtex input produces
.BR refer (1)
records, refer input produces canonical bibtex entries with citation
keys generated as by
.BR bib-key (1).
.PP
Without a flag the direction is detected from the input: text whose
first record starts with
.B @
is taken as bibtex, with
.B %
as refer.
.PP
When converting refer records to bibtex, the entry type is guessed
from the fields present: a journal
.RB ( %J )
gives an article, a book title
.RB ( %B )
an inproceedings or incollection, a report number
.RB ( %R )
a techreport, a bare publisher
.RB ( %I )
a book, and anything else a misc.
Page ranges are translated between
.B \-
and
.B \-\-
conventions.
The mapping is necessarily lossy in both directions; fields with no
counterpart are dropped.
.SH OPTIONS
.TP
.B \-b
Force refer-to-bibtex conversion.
.TP
.B \-r
Force bibtex-to-refer conversion.
.SH EXIT STATUS
0 on success, 1 if the input format cannot be detected, 2 on usage
error.
.SH ENVIRONMENT
.TP
.B BIBUTILS_LIB
Directory holding the shared awk library, overriding the default
search (lib/ next to the script, then /usr/local/share/bibutils).
.SH EXAMPLES
.nf
bib-convert refs.bib > refs.ref
bib-convert refs.ref | bib-add refs.bib
.fi
.SH SEE ALSO
.BR bib-key (1),
.BR bib-util (1),
.BR refer (1)