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 09-11-2020, 11:51 AM   #1
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,734
Karma: 5703586
Join Date: Nov 2009
Device: many
[Plugin] TOCSaver - save NCX ToC to allow Regen

Updated: February 21, 2025
Current Version: "0.3.5"

See the attached TOCSaver_v*.zip

License/Copying: GNU LGPL Version 2 or Version 3 your choice. Any other license terms are only available directly from the author in writing.

Change Log:
  • v0.1.0 - Initial Release
  • v0.2.0 - Added Icon
  • v0.3.0 - Skip files not currently part of the manifest
  • v0.3.5 - Do not use "hidden" under epub2 (Thank you BeckyEbook!)

Support for this plugin is only provided for Sigil 1.0 or later. This plugin requires Sigil 1.0 or later to even operate.

Description
This plugin is only needed if the current NCX ToC is not based on heading tags (or the heading tags contents are incomplete in some way). It will effectively save the NCX ToC back into the xhtml files so that the ToC Regeneration tools have a chance at recreating something close to the original.

To accomplish this, the plugin parses the current NCX ToC and follows those links back to the destination xhtml files and fragments and if need be either adds the title attribute to the current heading tag or alternatively will inject a hidden heading with display:none set with the appropriate contents.

Before Running on ePub3
This plugin will only parse the NCX ToC. So if you have an epub3 and want to save the Nav ToC, then use Sigil's ePub3 Tools to generate an NCX from the current Nav before launching the plugin.

Notes
Since this plugin could make changes to many xhtml files, it would be either a good idea to make a CheckPoint before running the plugin, or at the very least do a File Save-As under a new name, to make sure nothing is ever lost.

If you do run into cases where the plugin misses things, I would appreciate you PMing KevinH here with a sample epub that illustrates the issue so that the plugin can be made more robust.
Attached Files
File Type: zip TOCSaver_v035.zip (9.8 KB, 114 views)

Last edited by KevinH; 02-21-2025 at 03:18 PM.
KevinH is offline   Reply With Quote
Old 09-11-2020, 11:52 AM   #2
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,734
Karma: 5703586
Join Date: Nov 2009
Device: many
Reserve Follow Up in case this thread ever needs to expand
KevinH is offline   Reply With Quote
Advert
Old 09-11-2020, 05:15 PM   #3
Mister L
Groupie
Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Posts: 179
Karma: 91148
Join Date: Jun 2010
Device: Sony 350
Haha, I love the icon
Thanks for this plugin, really brilliant.
Mister L is offline   Reply With Quote
Old 09-12-2020, 11:13 AM   #4
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,734
Karma: 5703586
Join Date: Nov 2009
Device: many
Yes, although the piggy-bank turned out to be not very pig coloured, it does the job. You gotta love Inkscape's svg editor! Nothing else like it and free. I have it installed on macOS just for things like this even though it requires X11 and XQuartz just to run.

Quote:
Originally Posted by Mister L View Post
Haha, I love the icon
Thanks for this plugin, really brilliant.
KevinH is offline   Reply With Quote
Old 02-21-2025, 09:13 AM   #5
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,734
Karma: 5703586
Join Date: Nov 2009
Device: many
New Version of TOCSaver plugin available

Okay, just posted a new version of TOCSaver_v030.zip to the first post in this thread.

This version will simply skip any files missing from the manifest (instead of aborting with an error).
KevinH is offline   Reply With Quote
Advert
Old 02-21-2025, 03:19 PM   #6
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,734
Karma: 5703586
Join Date: Nov 2009
Device: many
And when it rains it pours ... Thanks to BeckyEbook catching once again that using the "hidden" attribute is not allowed on epub2 (according to epubcheck), we now have a new version v0.3.5 with this fixed.


Quote:
Originally Posted by KevinH View Post
Okay, just posted a new version of TOCSaver_v030.zip to the first post in this thread.

This version will simply skip any files missing from the manifest (instead of aborting with an error).
KevinH is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kindler previewer not recognizing toc.ncx file, my html toc, or the start point... petercrowell Kindle Formats 2 05-01-2012 08:14 AM
Toc.ncx JDawg Amazon Kindle 11 07-29-2011 04:05 AM
Toc.ncx question skypilotpete Workshop 3 07-09-2011 07:10 PM
Inline TOC from toc.ncx elmago79 Kindle Formats 38 03-25-2011 12:56 PM
Use Regex to Code an Inline TOC, from an External TOC's .ncx File mostlynovels ePub 2 03-16-2011 12:15 PM


All times are GMT -4. The time now is 06:50 AM.


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