View Single Post
Old 07-07-2020, 12:27 PM   #50
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 47,386
Karma: 171313058
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by Mister L View Post
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.
The problem for me is that when I played with similar issues a few years back, I ended up spending more time on trying to have my code handle special cases and not convert my ebook to egarbage than it would have taken me to do a regex to generate/modify the headers and then copy/paste. Entries that did not have header tags (<p> or <div> are more fun), h? tags wrapped around images, multiple h? tags in the same file (e.g. for the chapter title and subtitle), multiple chapters in the same file mixed with chapters split across multiple files (thank you, Gutenberg!), headers with multiple <a>, <span> and <br /> tags between the h? tags.

It was not a simple project and I was never happy with the results but it taught me quite a bit about Python and making sure I had backup copies.
DNSB is offline   Reply With Quote