From 4aec9800fca665713b0eba19f10af927b483332e Mon Sep 17 00:00:00 2001 From: "Douglas B. Rumbaugh" Date: Sat, 6 Jun 2026 12:17:21 -0400 Subject: Documentation --- man/bib-fetch.1 | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 man/bib-fetch.1 (limited to 'man/bib-fetch.1') diff --git a/man/bib-fetch.1 b/man/bib-fetch.1 new file mode 100644 index 0000000..0d41f78 --- /dev/null +++ b/man/bib-fetch.1 @@ -0,0 +1,61 @@ +.TH BIB-FETCH 1 "June 2026" "bibutils" "User Commands" +.SH NAME +bib-fetch \- fetch a bibtex entry for a pdf by DOI or arXiv id +.SH SYNOPSIS +.B bib-fetch +.RB [ \-d +.I doi +| +.B \-a +.IR arxiv-id ] +.RI [ file.pdf ] +.SH DESCRIPTION +.B bib-fetch +emits a bibtex entry, in canonical form and with a generated citation +key, for the document identified by a DOI or an arXiv id. +.PP +Unless an identifier is supplied with +.B \-d +or +.BR \-a , +the first two pages of +.I file.pdf +are searched (using +.BR pdftotext (1)) +for a DOI and, failing that, for an arXiv stamp of the form +.BR arXiv:2104.01234v2 . +Both modern and old-style +.RB ( cs/0101001 ) +arXiv ids are recognized. +.PP +DOIs are resolved through doi.org content negotiation (crossref and +friends); arXiv ids through arxiv.org. +Note that arXiv reports the year of the latest revision of a preprint, +not of its first submission. +.SH OPTIONS +.TP +.BI \-d " doi" +Fetch by DOI; no pdf is read. +.TP +.BI \-a " arxiv-id" +Fetch by arXiv id; no pdf is read. +A leading +.B arXiv: +prefix is accepted and stripped. +.SH EXIT STATUS +0 on success, 1 if no identifier could be found or the fetch failed, +2 on usage error. +.SH DEPENDENCIES +.BR curl (1) +always; +.BR pdftotext (1) +(poppler) for identifier extraction from pdfs. +.SH EXAMPLES +.nf +bib-fetch paper.pdf | bib-add refs.bib +bib-fetch -a 1706.03762 +.fi +.SH SEE ALSO +.BR bib-add (1), +.BR bib-key (1), +.BR bib-util (1) -- cgit v1.2.3