epubcheck¶
-
class
epubcheck.
EpubCheck
(infile, lang=u'en', profile=u'default', autorun=True)[source]¶ Wraps an epubcheck task and provides results as native python objects.
Parameters: - infile (str) – path to epubfile to be checked
- lang (str) – set language for generated messages
- profile (str) – name of epubcheck profule to use
- autorun (bool) – wether to run the checking process on instantiation.
-
class
epubcheck.models.
Checker
[source]¶ Checker related information from epubcheck json data.
Parameters: - path (str) – Relative path to checked epub
- filename (str) – Filename of checked epub
- checkerVersion (str) – Version string of epubcheck
- checkDate (str) – When the epub was checked
- elapsedTime (int) – processing time
- nFatal (int) – number of fatal errors
- nError (int) – number of errors
- nWarning (int) – number of warnings
- nUsage (int) – number of usage messages
-
class
epubcheck.models.
Meta
[source]¶ EPUB metadata from publication key in epubcheck json data.
Parameters: - publisher (str) – name of publisher
- title (str) – title of ebook
- creator (list[str]) – list of creators
- date (str) – date of ebook
- subject (list[str]) – list of ebook subjects
- description (str) – description of ebook
- rights (str) –
- identifier (str) –
- language (str) – language of ebook
- nSpines (int) –
- checkSum (int) –
- renditionLayout (str) –
- renditionSpread (str) –
- ePubVersion (str) –
- isScripted (bool) –
- hasFixedFormat (bool) –
- isBackwardCompatible (bool) –
- hasAudio (bool) –
- charsCount (int) –
- embeddedFonts (list[str]) –
- refFonts (list[str]) –
- hasEncryption (bool) –
- hasSignatures (bool) –
- contributors (list[str]) –
-
class
epubcheck.models.
Message
[source]¶ A Validation message representing a single error condition.
Parameters: - id (str) – Error type id (ex: “OPF-049”)
- level (str) – Severity of messeage (ex: “ERROR”)
- location (str) – Location of error (ex: <file>:<line>:<column>)
- message (str) – Description of the error condiction
- suggestion (str) – How to resolve error condition