Skip to main content

A BibTex parser and converter

Project description

bib2x

License: BSD PyPI version test Downloads Coverage Documentation Status

Donate

Introduction

bib2x is a tool for parsing and processing BibTeX files.

bib2x is currently under development. The latest version is 0.4.0.

The current use cases are:

  • Convert BibTeX-files to JSON

Examples

bib2x -i turing.bib -o turing.json -f json

Converts the BibTeX-file "turing.bib" into the JSON-file "turing.json" with the BibTeX entries.

bib2x -i turing.bib -o turing.html -f html

Converts the BibTeX-file "turing.bib" into a file named "turing.html" that contains a HTML list with the BibTeX entries.

Background

Being a somehow busy scientific coworker and a software guy, I wanted to render my publications for my web site.

For this purpose, I wrote BibPres, a commercial tool that uses JSON to store a publications list and JavaScript to render and interact with it.

bib2x is a rework of BibPres released as open source. Currently, only the parser is being ported as I want to change it so that it renders plain HTML, not a JSON file.

If you have any comments, ideas, or critics, please let me know.

License

bib2x is licensed under the BSD license.

Documentation

Running on the Command Line

bib2x is implemented in Python. It is started on the command line.

bib2x reads the BibTeX file defined using the --input <BIBTEX_FILE> option. It converts it to the format defined using the option --format <FORMAT> and saves it under the name defined using the option --output <FILE>. Currently, only "json" is available as destination format.

Examples

bib2x -i turing.bib -o turing.json

Converts the BibTeX-file "turing.bib" into the JSON-file "turing.json".

Command line arguments

The script can be started on the command line with the following options:

  • --input <BIBTEX_FILE> / -i <BIBTEX_FILE>: The BibTeX file to load
  • --output <FILE> / -o <FILE>: The file to write
  • --format <FORMAT> / -f <FORMAT>: The type of file to write ['json']
  • --help: Show a help message
  • --version: Show the version information

Further Links

ChangeLog for bib2x

bib2x-0.4.0 (27.03.2023)

  • Work on the documentation
  • Added HTML output
  • Further tests

bib2x-0.2.0 (08.03.2023)

  • Initial version

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bib2x-0.4.0.tar.gz (17.8 kB view hashes)

Uploaded Source

Built Distribution

bib2x-0.4.0-py3-none-any.whl (23.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page