View Single Post
Old 12-25-2016, 09:01 AM   #1
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,605
Karma: 23165369
Join Date: Dec 2010
Device: Kindle PW2
[Editor Plugin] EpubCheck

This plugin allows you to check books with EPUBCheck 5.x Make sure that you have Java installed on your machine before installing and running this plugin.

To test whether Java is installed on your machine open a command prompt/terminal window and enter the following command:

Code:
java -version
If you don't get a version number, Java is either not installed or the Java binary can't be found. If Java is not installed, go to the Oracle website to download the latest Java version. (Note that you'll need to re-boot your machine after the installation.)

Credits: Kovid Goyal who helped me with my Qt5 and Calibre API questions and gave me useful pointers. jackie_w helped me with the subprocess code and thiago.eec provided very helpful pointers.

Disclaimer: Since I'm not a programmer you might want to save your books before having them checked by this plugin. (The plugin will also automatically create a checkpoint.)

Troubleshooting: If you get a WindowsError: [Error 2] unhandled exception message, the Java binary couldn't be found. Installing/updating Java and re-booting your machine should take care of this problem.

Settings: If you're an advanced user, you can change several settings by creating an EpubCheck.json file with one or more of the following entries in the Calibre plugins folder (Preferences > Miscellaneous > Open calibre configuraton directory > plugins):

Code:
{
  "locale" : "xx",
  "usage" : true,
  "java_path": "path/to/java/or/java.exe,"
  "is32bit": false, 
  "github": true, 
  "check_interval": 7 
}
  1. If you want to change the language of EPUBCheck messages add a locale entry with one of the following language codes: en, de, es, fr, it, ja, nl, pt-BR, ko-KR.
  2. If you want EPUBCheck to also display USAGE messages, add a usage entry.
  3. If you want to use a custom Java path, add a java_path entry.
  4. The plugin should automatically detect 32bit JVMs. If it doesn't, change the value of the is32bit entry to true.
  5. By default, the plugin will automatically check the EPUBCheck Github website for updates. If you'd rather manually update the EPUBCheck Java files bundled with this plugin, change the value of the github entry to false.
  6. The value of the check_interval entry controls how often the plugin will contact the Github EPUBCheck website for updates. The default value is 7 days = once a week.

Please note that if you specify multiple values, each entry (except for the last one) must be terminated by a comma. (If you only add one entry, don't terminate it with a comma.)

If you still can't get the plugin to work, download Pagina Epub-Checker (freeware) and use it with the Calibre Open With plugin.

Version History
Spoiler:

Version 0.2.5 - 15 July 2023
Updated command line parameters for EPUBCheck 5.1.0
Version 0.2.4 - 2 Jan 2022
PyQt6 support added
Version 0.2.3 - 10 Jul 2020
EPUBCheck 4.2.4 bundled; better Python 3 support
Version 0.2.2 - 27 Dec 2019
Calibre dark mode support added
Version 0.2.1 - 9 Sep 2019
Minor bug fixes and enhancements
Version 0.2.0 - 9 Sep 2019
Minor bug fixes and enhancements
Version 0.1.9 - 19 Jul 2019
Updated EPUBCheck v4.2.1 to EPUBCheck v4.2.2.; added auto-update feature
Version 0.1.8 - 23 Apr 2019
Updated EPUBCheck v4.2.0 to EPUBCheck v4.2.1.
Version 0.1.7 - 23 Apr 2019
Updated EPUBCheck v4.1.0 to EPUBCheck v4.2.0.
Version 0.1.6 - 23 Jan 2019
Updated EPUBCheck v4.1.0 to EPUBCheck v4.1.1 & minor bug fixes.
Version 0.1.5 - 23 Dec 2018
Fixed INFO message bug and added support for usage and java_path parameters
Version 0.1.4 - 26 Nov 2018
Updated EpubCheck v4.0.2 to EPUBCheck v4.1.0.
Version 0.1.3 - 5 Nov 2018
The plugin will no longer display the Windows CMD window.
Version 0.1.2 - 22 Jun 2017
Added support for Windows temp folders on drives other than C:.
Version 0.1.1 - 25 Dec 2016
Disabled option to automatically close the Check Book tab.
Version 0.1.0 - 25 Dec 2016
Initial release.
Attached Files
File Type: zip EpubCheck.zip (8.9 KB, 16083 views)

Last edited by Doitsu; 07-15-2023 at 02:58 AM. Reason: New version with EPUBCheck 5.1.0
Doitsu is offline   Reply With Quote