Metadata-Version: 2.0
Name: elifetools
Version: 0.1.4
Summary: Tools for using article data in Python.
Home-page: https://github.com/elifesciences/elife-tools
Author: eLife Sciences Publications Ltd.
Author-email: py@elifesciences.org
License: MIT
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Requires-Dist: beautifulsoup4 (==4.3.2)
Requires-Dist: coverage (==3.7.1)
Requires-Dist: lettuce (==0.2.20)
Requires-Dist: lxml (==3.4.1)
Requires-Dist: python-Levenshtein (==0.12.0)
Requires-Dist: slugify (==0.0.1)
Requires-Dist: testtools (==0.9.34)
Requires-Dist: unittest-xml-reporting (==1.12.0)

elife-tools
===========

.. image:: https://travis-ci.org/elifesciences/elife-tools.svg?branch=master
   :target: https://travis-ci.org/elifesciences/elife-tools
   :alt: Latest Version

.. image:: https://coveralls.io/repos/elifesciences/elife-tools/badge.svg?branch=master&service=github
   :target: https://coveralls.io/github/elifesciences/elife-tools?branch=master

Tools for using article data in Python

Non-Python dependencies
=======================

* libxml2 (Ubuntu, Arch)

Install for users
=================

Install via `pip <http://www.pip-installer.org/>`_:

.. code-block:: bash

   $ pip install elifetools

You might need to install libxml manually first

.. code-block:: bash

   $ sudo STATIC_DEPS=true pip install lxml==3.4.1

To install the latest version directly from git

.. code-block:: bash

   $ pip install git+https://github.com/elifesciences/elife-tools.git@master

or you can add it to your project's requirements.txt file

.. code-block:: bash

   git+https://github.com/elifesciences/elife-tools.git@master


Install for developers
======================

Clone the git repo

Make a virtualenv (optional)

Then

.. code-block:: bash

   $ python setup.py install

Example usage
=============

.. code-block:: python

    >>> from elifetools import parseJATS as parser
    >>> soup = parser.parse_document('sample-xml/elife-kitchen-sink.xml')
    >>> print parser.doi(soup)

More code examples can be found in `tests/unittests/basic_usage_test.py`

These code examples can be run with:

.. code-block:: bash

    $ cd elifetools/
    $ python -m unittest discover -s tests/unittests/ -p *_test.py

and with xml output:

.. code-block:: bash

    $ cd elifetools/
    $ python -m xmlrunner discover -s tests/unittests/ -p *_test.py

Testing
=======

`Lettuce <http://packages.python.org/lettuce/>`_ for testing.

.. code-block:: bash

   $ cd elifetools/tests
   $ lettuce

License
=========

`The MIT License <http://opensource.org/licenses/mit-license.php>`_


