Checks, repairs and reports all id errors in the epub
Requirements
Plugin Type: Edit
MIT Licence(OSI)
Minimum Sigil requirement: v0.9.3 or higher
Python Requirements: Python 3.4+ (Bundled or External)
OS Requirements: Windows, Linux or OSX
*** Tested on Windows 7, 8 & 10 only ***
Current Version: "0.2.2"
Installation
* Select Manage Plugins from the Plugins menu. In the dialog box, select either the Bundled Python or the External Python(Python 3.4+ should be installed on your computer to run this plugin externally).
* Click
Add Plugin and select
IDErrorCheck_vXXX.zip. This will load and install the plugin into Sigil, which you can then run by selecting
Plugins > Edit > IDErrorCheck
Description
This plugin was originally written with the sole intention of properly reporting and, if possible, fixing Epubcheck's infamous "colon" id error problems. This plugin now also does the following:
* Converts all "name" attributes to "id" attributes in the html files.
* Now checks and repairs all invalid id attribute values in the epub's html files. Checks and repairs illegal spaces and illegal first-digit-start errors and also checks and repairs other illegal non-alphanumerics that commonly occur within id attribute values.(v0.1.5)
* Also checks and repairs all internal links that contain bad bookmarks associated with the above html id problems.(v0.1.5)
* Checks and repairs all book uuid values in the toc.ncx and content.opf. If an illegal book uuid value is found then another unique uuid will be automatically generated to replace it.(v0.1.5)
* Now checks and repairs all navPoint id values in the toc.ncx.(v0.1.5)
* Checks and logs all id errors occurring in the content.opf manifest or spine wihout fixing them.
* Will properly check, flag and identify Epubcheck's "colon" id errors and fix these errors.
* At the end of the plugin run, an error dialog will display a simple error list showing all relevant information about each id error including associated file, line number, reason and bad id.
Caveat
Don't use the "Mend and prettify..." Sigil feature directly after using this plugin. Doing so will change and increase the number of lines in the html files so that any reported error line numbers generated by the plugin automatically become inaccurate and void.
Plugin Run
First load your epub into Sigil and then just run the plugin. If you only want to know which errors have not been fixed then just run the plugin twice. The first time you run the plugin the display log will show you errors that have been fixed or not fixed. The second time you run the plugin will only show you what has not been fixed.
Update: This plugin can now process epubs that contain svg images without giving svg errors in Epubcheck.
Change Log: