Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 03-14-2018, 08:34 AM   #16
slowsmile
Witchman
slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.
 
Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
I've looked at your test file.

How many files are there in your test epub? Is there only one file in the Text directory in the Book Browser?

Are you using a valid epub that contains a cover file, toc file, text files, opf file, toc.ncx etc ?
slowsmile is offline   Reply With Quote
Old 03-14-2018, 08:46 AM   #17
slowsmile
Witchman
slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.
 
Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
Are you using an test epub with a valid epub structure -- i.e. does your test epub contain a cover file, a toc, xhtml files, toc.ncx, opf file etc ?

Or are you testing the plugin with just a single start.xhtml file in the book browser with an invalid opf file and/or an invalid toc.ncx file?

It would help an awful lot if you posted your test epub on this thread for download so that I can perhaps have a proper look to see what the problems are.
slowsmile is offline   Reply With Quote
Advert
Old 03-14-2018, 11:23 AM   #18
BeckyEbook
Guru
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 692
Karma: 2180740
Join Date: Jan 2017
Location: Poland
Device: Misc
Quote:
Originally Posted by slowsmile View Post
Are you using an test epub with a valid epub structure -- i.e. does your test epub contain a cover file, a toc, xhtml files, toc.ncx, opf file etc ?
Structure is valid.
The only problem is identifiers beginning with digits and references to them in other files (usually content.opf, toc.xhtml and toc.ncx).

Of course, I can correct it with two regular expressions (about 10 clicks, because I have to choose separately toc.ncx and content.opf and change to "Current File"). The plugin can fix it with one click.

Quote:
It would help an awful lot if you posted your test epub on this thread for download so that I can perhaps have a proper look to see what the problems are.
I am attaching the sample epub file (scrambled).
Attached Files
File Type: epub scrambled.epub (290.0 KB, 309 views)
BeckyEbook is online now   Reply With Quote
Old 03-14-2018, 08:57 PM   #19
slowsmile
Witchman
slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.
 
Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
Thanks for sending me your test epub. When I ran IDErrorCheck on your epub the results shown were correct for the toc.xhtml file. The plugin found and reported 'Illegal first start char' errors in this file and fixed them.

When I ran Epubcheck on your epub it also reported numerous 'illegal start char' id errors in several other xhtml files. These files had toc ids embedded in the <body> tag. The reason IDErrorCheck didn't find these errors was that my plugin only searches for ids in anchor tags -- in <a> tags only. There was also another problem reporting ids in the cover.xhtml with other id problems in the toc.ncx file. So I'll try and fix these problems and will put out a fix as soon as I can. And thanks for reporting these problems.

Last edited by slowsmile; 03-14-2018 at 10:20 PM.
slowsmile is offline   Reply With Quote
Old 03-14-2018, 10:38 PM   #20
slowsmile
Witchman
slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.
 
Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
Update: The following problems have been fixed in v0.1.4.

The plugin now also does the following:

* Checks ids in all tags in the xhtml files(not just anchor tags)

* Removes all problematic and superfluous ids from navpoint hrefs in the toc.ncx.

* Removes all problematic and superfluous ids from guide hrefs in the opf file.

Last edited by slowsmile; 03-15-2018 at 07:36 AM.
slowsmile is offline   Reply With Quote
Advert
Old 03-14-2018, 10:47 PM   #21
slowsmile
Witchman
slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.
 
Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
@ Becky...After running the new plugin version on your epub you should now only get two errors in Epubcheck in your test epub. These are:

* The first error is the id="calibre:cover" error which my plugin will report but cannot fix, which is correct plugin behaviour.

* The second problem is the svg error. To resolve this problem, just delete the epub cover.xhtml file in Sigil's Book Browser and then re-insert the cover image again properly using Sigil's Tools> Add Cover menu item. And once you've done that, your id="calibre:cover" error should also disappear as well.

Last edited by slowsmile; 03-14-2018 at 11:32 PM.
slowsmile is offline   Reply With Quote
Old 03-15-2018, 04:08 AM   #22
BeckyEbook
Guru
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 692
Karma: 2180740
Join Date: Jan 2017
Location: Poland
Device: Misc
@slowsmile: That was it! v0.1.4 works perfectly. Thank you!

name="calibre:cover" is not really problem.
For meta tag this is correct.
Look at this thread.

But of course Add Cover build new cover file and the problem disappears.
BeckyEbook is online now   Reply With Quote
Old 03-17-2018, 12:26 AM   #23
slowsmile
Witchman
slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.
 
Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
Update: The plugin has new functionality(v0.1.5):

* This plugin will now automatically repair all illegal non-alphanum characters within ids and within href ids in the epub xhtml files and toc.ncx only.

Last edited by slowsmile; 03-17-2018 at 12:36 AM.
slowsmile is offline   Reply With Quote
Old 03-17-2018, 05:08 AM   #24
BeckyEbook
Guru
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 692
Karma: 2180740
Join Date: Jan 2017
Location: Poland
Device: Misc
Version 0.1.5 – Ooops!

Such a restrictive exchange just causes errors where they were not.
IMHO adding "x" to the front was a better idea.

Now name="calibre:cover" is changed to id="calibrexcover"
a) loses meaning after re-opening in calibre
b) throws an error in the epubcheck

The names inside svg tag are case-sensitive: viewBox and preserveAspectRatio and after run plugin they are changed to lowercase (viewbox, preserveaspectratio).

And I will repeat it again, Add Cover will fix these errors, but ... these are additional clicks

Last edited by BeckyEbook; 03-17-2018 at 06:32 AM.
BeckyEbook is online now   Reply With Quote
Old 03-17-2018, 06:24 AM   #25
BeckyEbook
Guru
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 692
Karma: 2180740
Join Date: Jan 2017
Location: Poland
Device: Misc
By the way - I just discovered where the id from the number comes from (of course not all, just this special case):

valid epub file > kindlegen > mobi > add to calibre > convert to epub > tada!

Interestingly, such a converted epub file obviously does not want to cooperate with the kindlegen later, just because of the digits at the beginning of the id.

Maybe @kovidgoyal could change that, but he probably had a reason to do it that way.
BeckyEbook is online now   Reply With Quote
Old 03-17-2018, 08:43 AM   #26
slowsmile
Witchman
slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.
 
Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
Update: At Becky's suggestion, the plugin now prepends an 'x' for all illegal numeric first char problems in ids(ie as it was before the last change).
slowsmile is offline   Reply With Quote
Old 03-26-2018, 10:00 PM   #27
slowsmile
Witchman
slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.
 
Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
Update: The following changes have been made to this plugin(v0.1.7):

* Now removes the 'name="calibre:cover"' line in the cover file meta tags which was causing Epubcheck problems.

* Plugin now does not check or change any "name" attributes or their values in the meta tags of all xhtml files.
slowsmile is offline   Reply With Quote
Old 03-27-2018, 10:10 PM   #28
slowsmile
Witchman
slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.
 
Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
Update: Fixed a problem causing svg formatting errors in Epubcheck. SVG images can now be used in epubs without problems when using this plugin.(v0.1.8)
slowsmile is offline   Reply With Quote
Old 05-27-2018, 05:22 AM   #29
Thasaidon
Hedge Wizard
Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.
 
Thasaidon's Avatar
 
Posts: 800
Karma: 19999999
Join Date: May 2011
Location: UK/Philippines
Device: Kobo Touch, Nook Simple
Sorry Slowsmile for bothering you again. It is just that I use your plugins a lot.

Again it is more of a nuisance than giving me big problems.

Sometimes when I run the above plugin fails with an error message like the following.

Spoiler:
-- Copy NCX file to work dir...C:\Users\JOHNRU~1\AppData\Local\Temp\tmpt4ck m7ku\toc.ncx
Traceback (most recent call last):
File "C:\Prog1\Sigil\plugin_launchers\python\launcher.p y", line 135, in launch
self.exitcode = target_script.run(container)
File "C:\Users\John Rupik\AppData\Local\sigil-ebook\sigil\plugins\IDErrorCheck\plugin.py", line 93, in run
processAllTasks(bk, WDIR)
File "C:\Users\John Rupik\AppData\Local\sigil-ebook\sigil\plugins\IDErrorCheck\cutils.py", line 49, in processAllTasks
repairHTMLIDs(wdir, file)
File "C:\Users\John Rupik\AppData\Local\sigil-ebook\sigil\plugins\IDErrorCheck\cutils.py", line 178, in repairHTMLIDs
tag['id'] = anchor['name']
NameError: name 'anchor' is not defined
Error: name 'anchor' is not defined


It says on the error line the name 'anchor' is not defined. Please tell me what changes I need to make to the book so 'anchor' is defined. Unfortunately I am out of my depth and sink...glubglub.
Thasaidon is offline   Reply With Quote
Old 05-27-2018, 06:30 AM   #30
slowsmile
Witchman
slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.
 
Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
Update(v0.1.9): Fixed a bug whereby the plugin was failing to initially convert all epub "name" attributes to "id" attributes in order to make the error checking easier. My thanks to Thasaidon for spotting that one.

Last edited by slowsmile; 05-27-2018 at 06:59 AM.
slowsmile is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[FileType Plugin] YVES Bible Plugin ClashTheBunny Plugins 27 01-16-2023 01:25 AM
Goodread Perception Expander plugin not shown on plugin list (kobo h2o) www KOReader 4 09-28-2017 10:34 AM
Problem with my ScrambleEbook plugin and the Plugin Updater tool jackie_w Development 14 01-19-2017 10:49 PM
Plugin not customizable: Plugin: HTML Output does not need customization flyingfoxlee Conversion 2 02-24-2012 02:24 AM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 12:27 PM


All times are GMT -4. The time now is 03:23 AM.


MobileRead.com is a privately owned, operated and funded community.