epubcheck
epubcheck copied to clipboard
force save option
For whenever you have all the time in the world, it would be nice to have an option to force saving of an expanded epub even if epubcheck reports errors.
During development phases, there are times when the errors reported are erroneous but I'm forced to manually package.
That would be good. Meanwhile, I have been using this:
zipEpub.java:
import com.adobe.epubcheck.util.Archive;
public final class zipEpub {
public static void main(String[] args) throws Exception {
Archive epub = new Archive(args[0], true);
epub.createArchive();
}
}
zipEpub.sh:
root=$(pwd)
EPUB_FOLDER="${root}/EPUB3/"
find "${EPUB_FOLDER}" -name ".DS_Store" -depth -exec rm {} \;
javac -classpath "${root}/epubcheck.jar" "${root}/zipEpub.java" -d "${root}/bin" -sourcepath "${root}" #-verbose
java -classpath "${root}/epubcheck.jar:${root}/bin" zipEpub ${EPUB_FOLDER}
Thanks, Daniel!
Another thing I discovered with some playing is that setting the --fatal flag will basically do what I need, as the errors I get are related to not-yet-implemented features, so don't register that high.
I suppose that's equivalent to a force option, since there's no point in packaging an epub with fatal errors (although I haven't looked to see what all is categorized as fatal). Maybe we just need some tips and tricks...