BibLib
******
 
**biblib** is a (pure) python library that provides several useful classes, methods and functions to work with
BibTeX bibliographic data within your python scripts.


Usage example
=============

The following code will add a citation by their DOI:

.. code-block:: py

	import biblib

	# create database from BibTeX file
	dbObj = biblib.db_from_file('bibtex.bib')

	# retrieve bibliographic meta data by DOI
	entryObj = biblib.entry_from_doi('10.1088/0959-5309/43/5/301')

	# add new entry to database
	dbObj.add_entry(entryObj)

	# write database to a new BibTeX file
	biblib.db_to_file(dbObj,'new.bib')


Requirements
============

* currently **only** Python 2
* `isbnlib`_ for retreving citation entries via ISBN number
* `python-magic`_ for detecting character encoding


Installation
============

You can install the latest version from the `Python package index`_.
From the command line, enter (in some cases you have to precede the command with ``sudo``):

.. code-block:: bash

	$ pip install biblib --pre


.. note:: Because currently only a *development* version is available, you need to use the ``--pre`` option.

To install it manual, `download`_ the archive, unpack it, and type
(in some cases you have to precede the command with ``sudo``):

.. code-block:: bash

	$ python setup.py install


Documentation
=============

Documentation including installation procedure, tutorial and API:
http://pythonhosted.org/biblib/


Source
======

The complete source code *will soon be* available on `sourceforge`_.


.. _Python package index: https://pypi.python.org/pypi
.. _download: https://pypi.python.org/pypi/biblib
.. _isbnlib: https://pypi.python.org/pypi/isbnlib
.. _sourceforge: https://sourceforge.net/projects/pybiblib
.. _python-magic: https://pypi.python.org/pypi/python-magic