01-05-2013, 01:29 PM | #1 |
Imperfect Perfectionist
Posts: 460
Karma: 724664
Join Date: Dec 2011
Location: Ølstykke, Denmark
Device: none
|
ePubchecker the easy way
There are many complaints about how difficult it is to use the epubcheck validation tools.
I have made a very small tool for Windows (actually a two line batchfile!) to make it as easy as drag-and-drop. I enclose a zipped file containing the tool. It contains epubcheck-HOWTO.txt, containing an annotated how-to-use edition of the batchfile, and epubcheck.bat, which is the "clean" twoliner. Of course you must have some version of java on your machine, as the epubcheck validation tools is a java programme. I am sure this can be done in a similar way (python, shell script, whatever) on a mac or linux box - if anybody do it, or improve my little twoliner, please share! Regards Kim Last edited by elibrarian; 01-08-2013 at 08:45 AM. |
01-07-2013, 06:58 PM | #2 |
A curiosus lector!
Posts: 463
Karma: 2015140
Join Date: Jun 2012
Device: Sony PRS-T1, Kobo Touch
|
Hi, elibrarian,
Thanks for sharing this little app, this is a wise idea and indeed, things are a bit easier with it! However, it works only in one way: if the epub is correct, the message displayed is (for me): "Epubcheck Version 3.0 Validating against EPUB version 2.0 No errors or warnings detected. " Perfect! But if there are errors, here is the message displayed: "Version 3.0 Epubcheck Validating against EPUB version 2.0" This is to say: nothing! The cmd window disappears too quickly for me to read the error message. Two solutions perhaps: to prevent the cmd window from closing or copy the error message and redirect it into the text file. |
01-07-2013, 09:03 PM | #3 |
Grand Sorcerer
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
|
One fix is to open the epubcheck.bat file in a text editor like notepad and then change the > to 2>.
This will send the errors to the file instead of the progress messages. Another way to fix this is to leave > going to errors.txt as it does now and add 2>&1 at the end of the line to redirect the errors to the same file. This way, both progress messages and error messages will end up in the file. Which you do depends on what you want to happen. Dale Last edited by DaleDe; 01-07-2013 at 09:24 PM. |
01-07-2013, 10:13 PM | #4 |
A curiosus lector!
Posts: 463
Karma: 2015140
Join Date: Jun 2012
Device: Sony PRS-T1, Kobo Touch
|
Thanks Dale,
Now it works perfectly. Have a nice sunny day (here it's snowing ) Arios |
01-08-2013, 06:17 AM | #5 |
Imperfect Perfectionist
Posts: 460
Karma: 724664
Join Date: Dec 2011
Location: Ølstykke, Denmark
Device: none
|
There seems to be some differences in how the redirect > or >> works.
According to the specs, a single > redirects output and overwrite any file of the same name, whereas >> redirects and append to file. - which is how it works here on my Windows 7. The fille errors.txt should be in the same folder as the epubcheck.bat file (and should open in whatever texteditor is default on your system, but I have found, that it does not always work if you have a third-party editor set up as default.) Regards, Kim |
01-08-2013, 06:27 AM | #6 |
frumious Bandersnatch
Posts: 7,515
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
But ">" and ">>" redirect only the "normal output". The errors, if any, usually go through a different stream and must be directed separately. DaleDe's suggestion of using "2>&1" means that the errors (2) are redirected to the same place as the output (1).
|
01-08-2013, 08:46 AM | #7 | |
Imperfect Perfectionist
Posts: 460
Karma: 724664
Join Date: Dec 2011
Location: Ølstykke, Denmark
Device: none
|
Quote:
Regards, Kim |
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Permission denied while running epubchecker | me too | ePub | 0 | 10-18-2012 04:15 AM |
ePUBCHECKER errors | zenny | ePub | 39 | 06-16-2011 09:39 PM |
epubchecker error | robgor | ePub | 1 | 02-04-2011 02:10 AM |
newbie needs to make epub to pasa epubchecker | Ray Tayek | Calibre | 2 | 11-27-2010 11:31 PM |
How easy is it to take apart? | jimbobuk | Sony Reader | 10 | 12-25-2006 10:24 PM |