Skip to content
Python wrapper for epubcheck
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
ci
docs
src/epubcheck
tests
.bumpversion.cfg
.cookiecutterrc
.coveragerc
.editorconfig
.gitignore
.travis.yml
AUTHORS.rst
CHANGELOG.rst
CONTRIBUTING.rst
LICENSE
MANIFEST.in
README.rst
appveyor.yml
setup.cfg
setup.py
tox.ini

README.rst

Python wrappers for EpubCheck

Documentation Status Travis-CI Build Status AppVeyor Build Status Coverage Status

Introduction

The original EpubCheck is the standard Java based validation tool for EPUB provided by the IDPF.

This package provides a Python libary and command line tool for convenient validation of EPUB files by wrapping the original EpubCheck 4.0.1.

  • 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 package.

This package is tested with Python 2.7, 3.3, 3.4, 3.5 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

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

Windows
set PYTEST_ADDOPTS=--cov-append
tox
Other
PYTEST_ADDOPTS=--cov-append tox

Credits

EpubCheck is a project coordinated by IDPF. Most of the EpubCheck functionality comes from the schema validation tool Jing and schemas that were developed by IDPF and DAISY. Initial EpubCheck development was largely done at Adobe Systems.

You can’t perform that action at this time.