Metadata-Version: 2.1
Name: epubcheck
Version: 0.4.2
Summary: Python epubcheck wrapper
Home-page: https://github.com/titusz/epubcheck
Author: Titusz Pan
Author-email: tp@py7.de
License: BSD
Keywords: EPUB,validation,epubcheck,ebooks,QA,IDPF
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
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.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 :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Utilities
Requires-Dist: tablib
Requires-Dist: scandir

=============================
Python wrappers for EpubCheck
=============================

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

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

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

.. image:: https://codecov.io/github/titusz/epubcheck/coverage.svg?branch=master
    :target: https://codecov.io/github/titusz/epubcheck
    :alt: Coverage Status

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

The original `EpubCheck <https://github.com/w3c/epubcheck>`_ is the standard
Java based validation tool for EPUB maintained by
`DAISY Consortium <http://www.daisy.org/>`_ on behalf of the
`W3C <https://www.w3.org/publishing/epubcheck_fundraising>`_, originally
developed by the `IDPF <http://idpf.org/>`_.

This package provides a Python libary and command line tool for convenient
validation of  EPUB files by wrapping the original
`EpubCheck 4.2.2 <https://github.com/w3c/epubcheck/releases/tag/v4.2.2>`_.

* Free software: BSD license

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

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

    pip install epubcheck

You must have Python & Java installed on your system. The original Java
EpubCheck command line client itself is bundled in the
`PyPi <https://pypi.org/project/epubcheck/>`_ package.

This package is tested with Python 2.7, 3.4, 3.5, 3.6, 3.7 on Linux and Windows.
It should also work with PyPy.

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

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

Validata all epub files in the current directory::

    $ epubcheck

Validate a single EPUB file::

    $ epubcheck /path/to/book.epub

Validate all files in /epubfolder and create a detailed Excel report::

    $ epubcheck /path/epubfolder --xls report.xls

Show command line help::

    $ epubcheck -h


Using epubcheck as a python library
-----------------------------------

.. code-block:: pycon

    >>> from epubcheck import EpubCheck
    >>> result = EpubCheck('src/epubcheck/samples/invalid.epub')
    >>> print(result.valid)
    >>> print(result.messages)


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

https://epubcheck.readthedocs.org/


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

To run the all tests run::

    tox

Note, to combine the coverage data from all the tox environments run:

.. list-table::
    :widths: 10 90
    :stub-columns: 1

    - - Windows
      - ::

            set PYTEST_ADDOPTS=--cov-append
            tox

    - - Other
      - ::

            PYTEST_ADDOPTS=--cov-append tox

=======
Credits
=======

EpubCheck is a project coordinated by `IDPF <http://idpf.org/>`_. Most of the
EpubCheck functionality comes from the schema validation tool
`Jing <https://relaxng.org/jclark/jing.html>`_  and schemas that
were developed by `IDPF <http://idpf.org/>`_ and
`DAISY <http://www.daisy.org/>`_. Initial EpubCheck development was largely
done at `Adobe Systems <https://www.adobe.com/>`_.

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

0.4.2 (2019-08-07)
------------------

* Update the epubcheck.jar to v4.2.2 (see: https://github.com/w3c/epubcheck/releases/tag/v4.2.2)

0.3.1 (2016-04-20)
------------------

* Added custom PY2/PY3 compat module and removed dependancy on six

0.3.0 (2016-04-10)
------------------

* Add commandline support with Excel batch reporting
* Moved development status from Alpha to Beta

0.2.0 (2016-04-03)
------------------

* EpubCheck results as native python objects
* More documentation

0.1.0 (2016-04-01)
------------------

* First release on PyPI.


