This is a command-line application written in Python to convert a list of
publications in .bib
to .csv
.
EGI needs to provide the list of publications of several institutes as a spreadsheet with few defined columns:
Author | Year | Title | Source | DOI |
---|---|---|---|---|
This information can be downloaded as a ${filename}.bib
form websites like
https://inspirehep.net/
and
https://ui.adsabs.harvard.edu/
but they need to be converted and the list can be composed of few thousands of entries.
The script is built around the specific requirements converting and reordering just
the required fields and merging several filed in the Source
column.
It accepts incomplete tuples to avoid losing information.
pip install -r requirements.txt
Tested with python3
For the helpline:
./bib2csv -h
Use the following command to convert ${filename}.bib
to ${filename}.csv
:
./bib2csv ${flename}.md
A file named ${filename}.csv
will be generated in the folder of the orignal file.
It is also possible to merge multiple input ${files}.bib
in the same output file,
with -o
:
./bib2csv ${flename1}.md ${flename2}.md -o $%{outputfile.csv}
To remove the first line with the header
to make copy and paste quicker with the option -h
.