Skip to content

code56/elife-tools

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

elife-tools

Latest Version

image

Tools for using article data in Python

Non-Python dependencies

  • libxml2 (Ubuntu, Arch)

Install for users

Install via pip:

$ pip install elifetools

You might need to install libxml manually first

$ sudo STATIC_DEPS=true pip install lxml==3.4.1

To install the latest version directly from git

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

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

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

Install for developers

Clone the git repo

Make a virtualenv (optional)

Then

$ python setup.py install

Example usage

>>> 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:

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

and with xml output:

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

Testing

Lettuce for testing.

$ cd elifetools/tests
$ lettuce

License

The MIT License

About

Tools for using article data in Python

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Gherkin 58.2%
  • Python 41.8%