Open gamebeaker opened 1 month ago
@gamebeaker Possibly the feature is not well named. What it was intended to do was add the web page that held the Table of Contents to the epub. It's always been flaky, because it assumes the Table of Contents page has the same format as the chapters. When this is not true, it fails.
@dteviot Ok I expected that WebToEpub creates a page which contains all Chapter names and links to them like an Index. You can create suche an Index page in calibre if you convert an epub file to zip. Example:
What it was intended to do was add the web page that held the Table of Contents to the epub.
If i deselect Chapters that wouldn't be reflected. Is a better name "Add Index Page"? (after fix to reflect the rename)
@gamebeaker
It's purpose wasn't to create an index page. It an early (and only partially successful) attempt to provide an information page. The case was, there's a lot of sites where the "Table of Contents" page for a story has other information as well, e.g. Synopsis, Author, Dates, etc. So, the intent of this option was to capture this web page along with the actual chapters and package it into the epub.
But it has been (in my opinion) mostly replaced by the information page. I think it's still used by a number of people, for a limited number of sites.
If you want to create an index page, the Epub 3 format specified a HTML index page. So code to do it is already there. See: https://github.com/dteviot/WebToEpub/blob/0d1321a16eeee867323303d78729482545749516/plugin/js/EpubPacker.js#L254-L269
@dteviot
If you want to create an index page, the Epub 3 format specified a HTML index page. So code to do it is already there.
I don't think an Index is necessary, so i won't implement it. (All readers i know provide simple options to navigate different Chapter.)
In Advanced Options is an option "Add Page with Chapters to Chapters List" on royalroad it does nothing. (https://www.royalroad.com/fiction/81569/magus-reborn-mana-cultivation-kingdom-building) I would expect a page like the Information page to be added to the epub. What is the problem? https://github.com/dteviot/WebToEpub/blob/5bb659797b983fe1e19394c85b2bd1eb32190377/plugin/js/Parser.js#L397-L404 getChapterUrls() is overwritten from RoyalRoadParsers.js and the check isn't done.
I think the check is on the wrong position of the code as it always fails if getChapterUrls() is overwriten from the parser.