blob: 5c7a674a52ca7490fd30a51dc499ab4492e323de (
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
|
.TH BIB-ADD 1 "June 2026" "bibutils" "User Commands"
.SH NAME
bib-add \- insert bibtex entries into a database file
.SH SYNOPSIS
.B bib-add
.RB [ \-f ]
.I db.bib
.SH DESCRIPTION
.B bib-add
reads one or more fully formatted bibtex entries on standard input and
appends them to the database file
.IR db.bib ,
creating it if necessary.
Entries are canonicalized on the way in: entry types and field names
are lowercased, values are brace-delimited with internal whitespace
collapsed, bare numbers are left bare, and macro references and
.B #
concatenations are preserved verbatim.
.PP
If an incoming entry's key already exists in the database, the entry is
rejected and the duplicate keys are reported on standard error, unless
.B \-f
is given.
.SH OPTIONS
.TP
.B \-f
Replace existing entries that share a key with an incoming entry.
The database is rewritten canonically in the process.
.SH EXIT STATUS
0 on success, 1 if no entries were read or a duplicate key was
rejected, 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
Add a fetched entry to a database:
.nf
bib-fetch paper.pdf | bib-add refs.bib
.fi
.SH SEE ALSO
.BR bib-gen (1),
.BR bib-key (1),
.BR bib-util (1)
|