Skip to content
This repository has been archived by the owner on Dec 28, 2017. It is now read-only.
/ epub_validator Public archive

[INACTIVE] Ruby GEM for validating EPUB ebooks, using epubcheck

License

Notifications You must be signed in to change notification settings

mrcook/epub_validator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

epubValidator - Check your EPUB Books

This library will check that your .epub files are valid IDPF EPUB v2.x documents and return a successful or error message. It can be called as a Ruby library, or invoked from the command line.

For more about the IDPF see http://idpf.org

For more about the epubcheck tool see http://code.google.com/p/epubcheck/

Setup

gem install epub_validator

Basic Usage

Sample usage and output:

require 'epub_validator'

ev = EpubValidator.check('/path/to/sample.epub')
ev.message.each do |m|
  puts m
end
=> # FAILED!
=> # ERROR: OPS/toc.ncx(21): 'OPS/': referenced resource exists, but not declared in the OPF file

Now from the command line:

$ epub_validator /path/to/sample.epub
Checking....
FAILED!
ERROR: OPS/toc.ncx(21): 'OPS/': referenced resource exists, but not declared in the OPF file

Requirements

Java must be installed and set in your PATH.

Future Features

  • Accept a directory containing many .epub files for processing.
  • When using the command line, have option to write results to a log file
  • Format "ERROR" and "WARNING" output for more intuitive instructions.

About

[INACTIVE] Ruby GEM for validating EPUB ebooks, using epubcheck

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages