View Single Post
Old 07-07-2020, 09:21 AM   #49
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
Quote:
Originally Posted by slowsmile View Post
Thanks for your spec. I have to again question why you want a plugin to do that if, as I've said before, you can do that quite easily and quickly just using your current NCX TOC as a reference(unchanged). Just mark all the headings in the relevant xhtml files with an h1 tag if you want them in your TOC. You can use the 'h*' button in Sigil to do that. You only have to mark about 8 main headings with h1 in the xhtml files, which shouldn't take you long. After that, using your current NCX file as a reference(unchanged), you can then just use Sigil's Generate TOC dialog to edit and re-build the TOC the way you want it. And all that is achieved without using any regex! The alternative for me is to create a one-off much-more-complex plugin that is only good for one person because it's so specific. That's also why I'm rapidly losing interest in the plugin now -- because, as I see it, a plugin isn't really necessary.

In my ebooks the epub TOC page and NCX TOC are usually always different. I normally build a complex, mutilevel TOC for my epub TOC page and then I build a simpler single level NCX TOC with headings like "Chapter 1 ~ This is my chapter 1 subtitle", "Chapter 2 ~ This is my chapter 2 subtitle" etc. So my NCX TOC also combines the chapter heading with chapter subtitle just like in your spec. And I do all that quickly and easily just using the Generate TOC dialog in Sigil. You should first create your epub TOC page using Generate TOC + Create TOC and then you can create a different NCX TOC just using Generate TOC again on its own. In the Generate TOC dialog, you can edit the headings and just type in and combine the Chapter heading name with the Chapter subtitle name, exclude any unwanted headings and then press the OK button and you will have a brand new NCX TOC that is formatted to your own preference.
I am kind of at a loss here. Have you read my previous posts? Do you understand, the file I provided is intended only as an example? I am not asking for a plugin to handle one single specific file (especially not one with only 8 html files inside). Obviously this would be completely ridiculous. Apparently you have really misunderstood what I have been saying. I cannot just "easily and quickly" use the existing TOC, it is laborious and requires a lot of manual intervention. The point of the plugin is to simplify and automate that for use on many different files where "just generate the NCX" is not relevant; that's the entire point.

What is the precise function of the plugin you are working on? From your response here I think the problem you are trying to solve is not the same as the problem I am trying to solve. If you are not interested in pursuing this then please do not continue, it is starting to feel like we are talking at cross purposes and you are right, that is not a productive use of either of our time.
Mister L is offline   Reply With Quote