Metadata-Version: 2.0
Name: onixcheck
Version: 0.9.5
Summary: ONIX validation library and commandline tool
Home-page: https://github.com/titusz/onixcheck
Author: Titusz Pan
Author-email: tp@py7.de
License: BSD
Keywords: ONIX,validation,EDItEUR,XML,RelaxNG,XMLSchema
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: Unix
Classifier: Operating System :: POSIX
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Utilities
Requires-Dist: PyYAML
Requires-Dist: defusedxml
Requires-Dist: isbnlib
Requires-Dist: lxml
Requires-Dist: scandir
Requires-Dist: win-unicode-console

==========================================
Onixcheck - Book Trade Metadata Validation
==========================================


.. image:: https://readthedocs.org/projects/onixcheck/badge/?style=flat-square
    :target: https://readthedocs.org/projects/onixcheck
    :alt: Documentation Status

.. image:: http://img.shields.io/travis/titusz/onixcheck/master.svg?style=flat-square&label=Travis
    :target: https://travis-ci.org/titusz/onixcheck
    :alt: Travis-CI Build Status


.. image:: https://img.shields.io/appveyor/ci/titusz/onixcheck/master.svg?style=flat-square&label=AppVeyor
    :target: https://ci.appveyor.com/project/titusz/onixcheck
    :alt: AppVeyor Build Status


.. image:: http://img.shields.io/pypi/v/onixcheck.svg?style=flat-square
    :target: https://pypi.python.org/pypi/onixcheck
    :alt: PyPI Package latest release


.. image:: http://img.shields.io/pypi/dm/onixcheck.svg?style=flat-square
    :target: https://pypi.python.org/pypi/onixcheck
    :alt: PyPI Package monthly downloads


============
Introduction
============

`ONIX for Books <http://www.editeur.org/11/Books/>`_ is an international XML
standard for the publishing and book trade industry.

``onixcheck`` is a Python library and command line tool for validating ONIX
metadata. It allows you to validate ONIX versions 2.1 and 3.0 against the
official XML Schema.


* Free software: BSD license

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

On Windows you can download the standalone binary command line tool:
`onixcheck-0.9.4_win.zip <https://github.com/titusz/onixcheck/releases/download/v0.9.4/onixcheck-0.9.4_win.zip>`_

If you have Python or PyPy installed on your system you can do the usual::

    pip install onixcheck


==========
Quickstart
==========

Command line usage examples
---------------------------

Validate all .xml, .onx, .onix files in current directory::

    onixcheck


Validate a single onix file::

    onixcheck myonixfile.xml


Validate all .xml files in /onixdata and its subdirectories::

    onixcheck --path /onixdata --ext xml --recursive


Show help::

    onixcheck -h


Using onixcheck as a python lib
-------------------------------

Simple usage with `onixcheck.validate`:

.. code-block:: pycon

    >>> import onixcheck
    >>> errors = onixcheck.validate('src/onixcheck/data/invalid_onix3_ref.xml')
    >>> print(errors[0].short)
    ERROR - SCHEMASV - invalid_onix3_ref.xml:4:0 - Element 'SentDateTime': This element is not expected. Expected is ( Sender ).

`errors` is either a list of `Message` objects (INVALID file) or an empty list (VALID file)

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

https://onixcheck.readthedocs.org/

===========
Development
===========

To run the all tests run::

    tox

Contributions/suggestions are welcome.

=========
Changelog
=========

0.9.5 (2016-08-19)
------------------
* Update Onix 3 to Code List issue 34
* Remove build artifacts from source distribution

0.9.4 (2016-07-15)
------------------
* Fix issue with windows console output encoding
* Update windows build to pyinstaller 3.1

0.9.3 (2016-05-10)
------------------
* Update ONIX 3.0 Schemas to Revision 3
* Add support for RELAX NG and custom schema validations
* Added validator name to short message output

0.9.2 (2016-04-11)
------------------
* Fix ExtentType in custom validation profile
* Fix false alarm with multiple Price elements in custom profile

0.9.1 (2016-04-11)
------------------
* Inital support for custom validation profiles
* Custom Google Play Books onix 3.0 validation profile

0.9.0 (2016-03-27)
------------------

* Added Python 3.5 testing / support
* Update to ONIX to Code List Issue 32 / 2016-01-24

0.8.1 (2015-07-23)
------------------

* More extensive documentation

0.8.0 (2015-07-23)
------------------

* Added CLI-support for fast directory traversal validation
* Secured XML-Parsing via defusedxml
* Catch basic XML syntax errors
* Windows standalone binary builds

0.4.0 (2015-07-18)
------------------

* First release on PyPI.


