/lax

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

Lax

An effort by eLife Sciences to provide a flexible, mostly-structured, data store for articles.

This project uses the Python programming language, the Django web framework and a relational database.

Github repo.

API

Documentation can be found here:

For example, the Homo Naledi article:

RSS

RSS feeds are available here:

The URLs look like:

https://lax.elifesciences.org/rss/articles/<status[+status]>/last-<n>-days/

For example, if you wanted all articles published in the last month:

https://lax.elifesciences.org/rss/articles/poa+vor/last-28-days/

installation

code

git clone https://github.com/elifesciences/lax
cd lax
./install.sh

Postgresql is used in production so there is a dependency on psycopg2 which requires your distribution's 'libpq' library to be installed. On Arch Linux, this is 'libpqxx', on Ubuntu this is 'libpq-dev'.

updating

code

./install.sh

testing

code

./test.sh

running

code

./manage.sh runserver
firefox http://127.0.0.1:8000/api/docs/

data model

code

A publisher has one or many journals, each journal has many articles.

Each article is uniquely identified by it's 'manuscript id', a simple integer.

Each article may have many versions. Each article version contains the article-json (derived from the article's JATS xml), the date and time it was published, etc.

loading article JSON

Lax has support for two internal (to eLife) types of article json: EIF and 'article-json'.

EIF was a loosely structured format that was extremely convenient for sharing just the important bulk of article data between the elife-bot, lax, and the Drupal journal website.

This format is deprecated and support will eventually be removed.

The other format is article-json, defined as part of elife's API definition effort and used extensively in our new infrastructure.

These article-json files can be imported into Lax with:

code

./manage.sh ingest /path/to/article.json

See the bot-lax-adaptor for converting JATs XML to article-json.

Copyright & Licence

Copyright 2016 eLife Sciences. Licensed under the GPLv3

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.