ReportIDErrors

 

A Sigil Plugin


Checks, repairs and reports all id errors in the pub

 

 

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.1.0"

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 ReportIDErrors_vXXX.zip. This will load and install the plugin into Sigil, which you can then run the plugin by selecting Plugins > Edit > ReportIDErrors

Description

This plugin was orignally 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.

* Checks and, if possible, repairs all invalid id attribute values in the epub's html files. Checks for illegal spaces and illegal first-digit-start and also checks for illegal non-alphanumerics that commonly occur in id attribute values.

* Also checks and, if possible, repairs internal links that contain bad bookmarks associated with the above html id problems

* Checks and repairs all book id uuid values in the toc.ncx and content.opf. If an illegal book id value is found then another book id will be automatically generated to replace it. Dependencies will be automatically updated.

* Checks and, if possible, repairs all navPoint id values in the toc.ncx.

* Checks and logs all id errors occurring in the content.opf manifest or spine wihout fixing fix them. These opf errors can sometimes be resolved by simply renaming the appropriate file that is associated with the bad id in the Sigil Browser.

* At the end of the run, an error log dialog will display all relevant file names with associated error line numbers and will also say whether the error has been fixed or not.

Caveat

Do not 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 nos generated by the plugin will 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 and not fixed. The second time you run the plugin will only show you what has not been fixed.