Skip to main content

Bib(la)tex parsing and useful tools

Project description

bibpy v1.0.1

Build status Read the Docs Coverage Status GitHub license PyPI PyPI wheel Python version

Python library for parsing bib(la)tex files and manipulating entries.

Installation

pip install bibpy

Quickstart

>>> import bibpy
>>> result = bibpy.read_file('references.bib')  # Read a bib file
>>> entries = result.entries
>>> print len(entries)
6
>>> print entries[0].author
'D. J. Power'
>>> print entries[0].bibkey
'2006_power'
>>> print entries[0].bibtype
'online'
>>> print entries[0].valid('bibtex')
True  # Entry is a valid bibtex entry
>>> print entries[0].valid('biblatex')
False  # But is not a valid biblatex entry (missing field 'date' or 'year')
>>> print entries[0].aliases('bibtex')
[]
>>> print entries[0].aliases('biblatex')
['electronic', 'www']
>>> bibpy.write_file('references.bib', entries)

See the examples folder for more usage examples or read the tutorial.

Tools

bibpy also comes with three tools that are installed as runnable scripts.

  • bibformat: Clean up, format and align references
  • bibgrep : Find and filter references using a simple query language
  • bibstats : Display statistics about bib files

All three tools are described in more detail in the tutorial.

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

bibpy-1.0.1.tar.gz (156.0 kB view details)

Uploaded Source

Built Distribution

bibpy-1.0.1-py3-none-any.whl (49.1 kB view details)

Uploaded Python 3

File details

Details for the file bibpy-1.0.1.tar.gz.

File metadata

  • Download URL: bibpy-1.0.1.tar.gz
  • Upload date:
  • Size: 156.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.1

File hashes

Hashes for bibpy-1.0.1.tar.gz
Algorithm Hash digest
SHA256 e24dfc5baf1b826d8d105ba652daf27f2b05cb431cde717482ad1fbf5593c39d
MD5 de1358c0f06a09a050bf585731c6268b
BLAKE2b-256 ce3940e1fbc97049d741a5c24cf63d606fd028857b951cb92b42845afc7ff283

See more details on using hashes here.

File details

Details for the file bibpy-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: bibpy-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 49.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.1

File hashes

Hashes for bibpy-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 08ae3c98cdd2198941e2395af0d47af3c5904ace8b92a4dad72b62f8b81740d6
MD5 73c582cc044d1573fab046466a81e73e
BLAKE2b-256 0fa876fcce28a4af04dbffaf1b729b7da15a07ea81a57b8db11683921dfe89e6

See more details on using hashes here.

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