elifecrossref


Nameelifecrossref JSON
Version 0.28.0 PyPI version JSON
download
home_pagehttps://github.com/elifesciences/elife-crossref-xml-generation
SummaryeLife Crossref deposit of journal articles.
upload_time2024-01-09 23:02:15
maintainereLife Sciences Publications Ltd.
docs_urlNone
author
requires_python
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            elife-crossref-xml-generation
=============================

Crossref deposit of journal articles

Overview
========

elife-crossref-xml-generation creates a Crossref content registration file for a journal article. The registration file is an XML file conforming to the Crossref schema. The code library is used by eLife in its publishing workflow to submit the content registration file by a POST request to the Crossref API endpoint, in order to register DOI values and metadata at Crossref. Following some basic changes to a configuration file, it should be able to generate Crossref content registration files for non-eLife journals.

This library is intended for use by developers, typically integrated into a workflow. There are some options and decisions to make for how you connect it ot your existing workflows, or create an interface to convert individual JATS XML files via a web form, for example.

Supported features
==================

* DOI
* article title and basic metadata (volume, issue, pub date, issn, etc.)
* contributors
* abstract
* Fundref
* AccessIndicators
* relations (inter_work_relation)
* text and data mining (TDM) links
* citation_list
* components (if you have component DOI values)

Ways to implement it
====================

The data passes through distinct steps, and at these steps the data can be altered if you would like to in your implementation of the library. The default data conversion begins with a JATS XML file, the XML is parsed to extract values into article objects, the article objects are used in a crossrefXML object to construct a Crossref XML representation of the data, and finally the CrossrefXML object can produce XML output. 

  JATS XML -> article objects -> CrossrefXML object -> Crossref XML output

There are situations you may want to manipulate the data prior to generating Crossref XML. For example, if the article XML is missing a publication date, or you want to specify a version of the article, then you could manipulate the objects in this way before you instantiate the CrossrefXML object.

  JATS XML -> article objects -> manipulate the objects -> CrossrefXML object -> Crossref XML output

Another way you can use this library

  JATS XML -> article objects -> manipulate the objects -> CrossrefXML object -> Crossref XML output

Install
=======

a) Install it locally

Clone the git repo

.. code-block:: bash

  git clone https://github.com/elifesciences/elife-crossref-xml-generation.git

Create a python virtual environment and activate it

.. code-block:: bash

  virtualenv venv
  source venv/bin/activate

Install it locally

.. code-block:: bash

  pip install -r requirements.txt
  pip setup.py install

b) Or, integrate it into your project

Add to your requirements.txt file of your project a particular commit of this library, for example:

.. code-block:: bash

  git+https://github.com/elifesciences/elife-crossref-xml-generation.git@288f0bc8d1148eb1795c8ae18a3985d30ba38cd5#egg=elifecrossref

Then you should be able to import the library as `elifecrossref`.

Configuration
=============

The crossref.cfg file can edited to include your particular values and options. There are some default options, and then a section for each journal to override the default values. Each particular option may support a string, boolean, integer, or list of values. Create a section of your own in the style of [journal_name] and then add the values below it you want to override.

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

In interactive Python, below is an example.

.. code-block:: python

    >>> from elifecrossref import generate
    >>> articles = generate.build_articles_for_crossref(["tests/test_data/elife-00666.xml"])
    >>> articles[0].version = 1
    >>> print generate.crossref_xml(articles, "elife")

There are other options in the `generate.py` file to return the CrossrefXML object created, or to write the output to disk using a single function call.

Contributing to the project
===========================

If you have a contribution you would like us to consider, please send a pull request. Open an issues on Github if you get an error. There may be minor changes required to support alternate JATS XML variations. If your XML is open licensed, we may want to add it specifically to the test cases for the project.

License
=======

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

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/elifesciences/elife-crossref-xml-generation",
    "name": "elifecrossref",
    "maintainer": "eLife Sciences Publications Ltd.",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "py@elifesciences.org",
    "keywords": "",
    "author": "",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/07/31/75810cd6b23f744c89d741a947329637f0924dcd8c82f85621b797f89e51/elifecrossref-0.28.0.tar.gz",
    "platform": null,
    "description": "elife-crossref-xml-generation\n=============================\n\nCrossref deposit of journal articles\n\nOverview\n========\n\nelife-crossref-xml-generation creates a Crossref content registration file for a journal article. The registration file is an XML file conforming to the Crossref schema. The code library is used by eLife in its publishing workflow to submit the content registration file by a POST request to the Crossref API endpoint, in order to register DOI values and metadata at Crossref. Following some basic changes to a configuration file, it should be able to generate Crossref content registration files for non-eLife journals.\n\nThis library is intended for use by developers, typically integrated into a workflow. There are some options and decisions to make for how you connect it ot your existing workflows, or create an interface to convert individual JATS XML files via a web form, for example.\n\nSupported features\n==================\n\n* DOI\n* article title and basic metadata (volume, issue, pub date, issn, etc.)\n* contributors\n* abstract\n* Fundref\n* AccessIndicators\n* relations (inter_work_relation)\n* text and data mining (TDM) links\n* citation_list\n* components (if you have component DOI values)\n\nWays to implement it\n====================\n\nThe data passes through distinct steps, and at these steps the data can be altered if you would like to in your implementation of the library. The default data conversion begins with a JATS XML file, the XML is parsed to extract values into article objects, the article objects are used in a crossrefXML object to construct a Crossref XML representation of the data, and finally the CrossrefXML object can produce XML output. \n\n  JATS XML -> article objects -> CrossrefXML object -> Crossref XML output\n\nThere are situations you may want to manipulate the data prior to generating Crossref XML. For example, if the article XML is missing a publication date, or you want to specify a version of the article, then you could manipulate the objects in this way before you instantiate the CrossrefXML object.\n\n  JATS XML -> article objects -> manipulate the objects -> CrossrefXML object -> Crossref XML output\n\nAnother way you can use this library\n\n  JATS XML -> article objects -> manipulate the objects -> CrossrefXML object -> Crossref XML output\n\nInstall\n=======\n\na) Install it locally\n\nClone the git repo\n\n.. code-block:: bash\n\n  git clone https://github.com/elifesciences/elife-crossref-xml-generation.git\n\nCreate a python virtual environment and activate it\n\n.. code-block:: bash\n\n  virtualenv venv\n  source venv/bin/activate\n\nInstall it locally\n\n.. code-block:: bash\n\n  pip install -r requirements.txt\n  pip setup.py install\n\nb) Or, integrate it into your project\n\nAdd to your requirements.txt file of your project a particular commit of this library, for example:\n\n.. code-block:: bash\n\n  git+https://github.com/elifesciences/elife-crossref-xml-generation.git@288f0bc8d1148eb1795c8ae18a3985d30ba38cd5#egg=elifecrossref\n\nThen you should be able to import the library as `elifecrossref`.\n\nConfiguration\n=============\n\nThe crossref.cfg file can edited to include your particular values and options. There are some default options, and then a section for each journal to override the default values. Each particular option may support a string, boolean, integer, or list of values. Create a section of your own in the style of [journal_name] and then add the values below it you want to override.\n\nExample usage\n=============\n\nIn interactive Python, below is an example.\n\n.. code-block:: python\n\n    >>> from elifecrossref import generate\n    >>> articles = generate.build_articles_for_crossref([\"tests/test_data/elife-00666.xml\"])\n    >>> articles[0].version = 1\n    >>> print generate.crossref_xml(articles, \"elife\")\n\nThere are other options in the `generate.py` file to return the CrossrefXML object created, or to write the output to disk using a single function call.\n\nContributing to the project\n===========================\n\nIf you have a contribution you would like us to consider, please send a pull request. Open an issues on Github if you get an error. There may be minor changes required to support alternate JATS XML variations. If your XML is open licensed, we may want to add it specifically to the test cases for the project.\n\nLicense\n=======\n\n`The MIT License <http://opensource.org/licenses/mit-license.php>`_\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "eLife Crossref deposit of journal articles.",
    "version": "0.28.0",
    "project_urls": {
        "Homepage": "https://github.com/elifesciences/elife-crossref-xml-generation"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bc94fe596d395fca618c9155d7aaa1ba52cdb2bdb8f5d5b2e1e63a623549ee16",
                "md5": "d903021c19c95840a6f4ccc96630c271",
                "sha256": "4f718a3427be9ee4b929315a38e5bf53e5e2e3676ce159e7884fcef661b6ea6d"
            },
            "downloads": -1,
            "filename": "elifecrossref-0.28.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d903021c19c95840a6f4ccc96630c271",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 30915,
            "upload_time": "2024-01-09T23:02:13",
            "upload_time_iso_8601": "2024-01-09T23:02:13.534017Z",
            "url": "https://files.pythonhosted.org/packages/bc/94/fe596d395fca618c9155d7aaa1ba52cdb2bdb8f5d5b2e1e63a623549ee16/elifecrossref-0.28.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "073175810cd6b23f744c89d741a947329637f0924dcd8c82f85621b797f89e51",
                "md5": "2b0ae9b999b11c67f036df7ab3634053",
                "sha256": "29639c5adc4da200c5275d58b5af67507db992ee816e77199d6ee61422b2caed"
            },
            "downloads": -1,
            "filename": "elifecrossref-0.28.0.tar.gz",
            "has_sig": false,
            "md5_digest": "2b0ae9b999b11c67f036df7ab3634053",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 38568,
            "upload_time": "2024-01-09T23:02:15",
            "upload_time_iso_8601": "2024-01-09T23:02:15.386788Z",
            "url": "https://files.pythonhosted.org/packages/07/31/75810cd6b23f744c89d741a947329637f0924dcd8c82f85621b797f89e51/elifecrossref-0.28.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-09 23:02:15",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "elifesciences",
    "github_project": "elife-crossref-xml-generation",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": false,
    "requirements": [],
    "lcname": "elifecrossref"
}
        
Elapsed time: 0.16883s