bibman
Description
A simple bibliography manager.
bibman
is a simpler and less feature-rich alternative to applications like papis.
It uses the crossref and datacite apis to
search for citations using the DOI.
Features:
- Manually add citations
- Import citations via doi (crossref/datacite api)
- Import citations in bibtex format
- Export bibliography in bibtex format
- TUI to edit the bibliography
- Linking a file to a citation
- Neovim telescope plugin code
Usage
USAGE: bibman [flag] <args>
For more help visit: https://codeberg.org/KMIJPH/bibman
FLAGS:
-help show this message
-a <doi> <file> add citation (if no doi specified, add manually)
-b prints bibliography in bibtex format to stdout
-i imports bibtex from stdin
-j prints (simplified) bibliography in json format to stdout
-t launch tui
Examples
Adding a citation:
# add manually
EDITOR=nvim bibman -a
# doi
bibman -a "10.1126/science.1155121"
# add a file
bibman -a "10.1126/science.1155121" bonan.pdf
Importing bibtex:
cat test.bib | bibman -i
Exporting to bibtex:
bibman -b > test.bib
Launch the TUI:
EDITOR=nvim bibman -t
Installation
make install
or check out the makefile to do it manually.
Build-time dependencies:
Runtime dependencies
Mail
bibman
will attempt to look for the MAILADDR
environmental variable
when querying crossref/datacite, to have some sort of contact information,
in case the requests cause trouble (even though the request done by bibman
is a rather inexpensive one).
Users should follow this "polite" approach,
as the data provided by crossref/datacite are free and open.
[...]
But this semi-anonymous access is also hard for us to manage.
Because the “Public” version of the REST API is free, traffic patterns can vary wildly.
Because the service is semi-anonymous it makes it very hard for us to
contact people who are causing problems on the system.
[...]
For more information, see here.
Bibtex
bibman
supports the biblatex specification.
It is assumed that biber or any
other biblatex compatible bibliography processor is used.
Files
When adding a file to the -a command, bibman
copies the file to:
$HOME/.local/share/bibliography
, which is also bibman's directory for storing
its database.
On Windows and Mac it will use golang's os.UserCacheDir.
A new filename is given to the file, using author, year and title of the citation.
If no file is passed, bibman
will link a filename anyway.
This makes adding a file after the creation of the citation easier.
Import/Export
When importing bibtex, bibman
assumes a reasonably well formatted .bib file.
The parsing is not very sophisticated and uses simple regex.
For examples see here.
NOTE: bibman
can import .bib files with multiple citations.
NOTE: only the standard set of entry types are supported.
NOTE: only the some of the data fields are supported.
Editing citations
bibman
uses the EDITOR
environmental variable to edit citations.
To change the editor, pass a new EDITOR
value (see examples).
Tui
bibman
provides a TUI to edit the citation database with VIM-like keybindings.
For a list of keybindings and commands type :help
in TUI mode.
Neovim plugin
The code for the neovim telescope plugin can be found here.
It is the users job to source the file in init.lua
.