EpubCheck

From MobileRead
(Redirected from Epubcheck)
Jump to: navigation, search

EpubCheck is the official checking tool for ePub files. It currently checks both ePub 2 and ePub 3. It does not check CSS.

Contents

[edit] Overview

EpubCheck is a Java tool. Note that epubcheck is normally used from a command line starting it from Java. It is possible to make a simple script (batch file) to invoke java and run EpubCheck from an icon so you can drag an ePub to the tool icon. You can also download a GUI front-end.

[edit] Syntax

java -jar epubcheck-3.0.1.jar singleFile [-mode MODE] [-v VERSION]
   MODE must be one of the following:
       opf for package document validation;
       nav for navigation document validation (available only for version 3.0);
       mo for media overlay validation (available only for version 3.0);
       xhtml;
       svg;
       exp for Expanded EPUB validation (see next section)

   VERSION must be one of
       2.0
       3.0

Note that when validating a single file, only a subset of the available tests is run. Also, when validating a full EPUB, both mode and version are ignored. Expanded mode

java -jar epubcheck-3.0.1.jar folder/ -mode exp [-save]

When using expanded mode, there's an optional flag -save to save the created archive upon validation.

Additional options

   -out file.xml outputs an assessment XML document
   -quiet or -q outputs only if there is any warning or error
   -help, --help or -? displays a help message

[edit] Simple Script

Here is a Windows batch file (easily modified for Unix)

"C:\Program Files (x86)\Java\jre7\bin\java.exe" -jar epubcheck.jar %1 > errors.txt 2>&1
START type errors.txt

To use this script download epubcheck and place the script where epubcheck is located. then rename the jar file to simple epubcheck.jar. See MobileRead forum for the discussion.

[edit] Downloads

[edit] Releases

[edit] 4.02

Enhancements

  1. 673 – Enhanced XML report output:
  2. 486 – @subMessage and @severity attributes on <message> element
  3. 517 – Include list of all resources + media types
  4. 670 – Fix illegal characters in XML output
  5. 657 – New method Archive.createArchive(File) to specify file paths when using this in 3rd party tools

Bug fixes

  1. Security Fix for critical vulnerability CVE-2016-9487. This permitted hackers to invade a machine.
  2. 689 – Fix for unclosed ImageInputStreams on image file validation
  3. 678 – Clarify ACC-009 message: 'alt' -> 'alttext' attribute
  4. 686 – Make BitmapChecker.ImageHeuristics a public object
  5. 711 – Bugfix for false positive error messages due to locale settings

[edit] 4.0

The Pre-release of v4.0 brought support for ePub 3.0.1 and initial support for the EDUPUB profile.

Changes related to EPUB 3.0.1

  • Package files (OPF)
    • new collection element
    • multiple dc:type elements are now allowed
    • multiple dc:source elements has now allowed
    • allow "record" as value of link rel attribute (requires media-type set)
    • new belongs-to-collection and collection-type metadata properties
    • new media:playback-active-class metadata property
    • new source-of metadata property
    • new rendition:* metadata properties
    • new reserved prefix schema for schema.org vocabularies
    • improved prefix declaration parsing
  • XHTML Content Documents
    • RDFa and Microdata attributes are now allowed and checked for correctness
    • improved prefix declaration parsing
    • improved checking of epub:type attribute values
    • allows custom (namespaced) attributes on any element
    • new triggers ev:defaultAction, ev:phase and ev:propagate
    • new attribute aria-describedat
    • requires xhtml extension on files.
  • SVG Content Documents
    • the epub:type attribute is now allowed on any element
    • Structural semantics vocabulary
    • new term assessment
    • new term learning-objective
    • new term learning-resource
    • new term loa
    • new term lov
    • new term qna
    • new term revision-history

Changes related to EDUPUB

  • Identification of EDUPUB content from the dc:type edupub
  • Custom OPF checks for EDUPUB metadata rules
  • Support for ditributable-object and manifest collections
  • checks for epub:type semantics
  • checks for headings-related rules

Changes to the internal EpubCheck's internals:

  • Early parsing of dc:type in the OPFData object
  • Possibility to set multiple XMLValidator (i.e. schemas) in most checkers
  • Revamped prefix attribute parsing
  • New API for representing vocabularies and property-datatype values.

[edit] For more information

Personal tools
Namespaces

Variants
Actions
Navigation
MobileRead Networks
Toolbox