jncep icon indicating copy to clipboard operation
jncep copied to clipboard

[Feature Request] Add support for making TOC by chapter not part

Open sh1mmer opened this issue 1 year ago • 2 comments

It would be nice if when making ebooks by volume the chapter heading could be used instead of the parts. I looked at the contents of a bunch of different series I read and all the ones I looked at used <h1> to indicate chapter headings pretty cleanly.

I don't think it would be too complex. Since title is set core._process_single_epub_content() [1] I was thinking you could re-process contents [2] to be split by <h1> instead of part and just change the part titles.

I'll try and make a PR that we can discuss.

sh1mmer avatar Oct 05 '23 19:10 sh1mmer

Thank you for your feedback.

OK. It is fine as an option.

I will be waiting for your PR. Would that be only for full volumes ? (I don't think parts always start with a h1 title, so it might be confusing).

gvellut avatar Oct 07 '23 18:10 gvellut

I think it should work for non full volumes with the caveat you might not have a complete chapter.

sh1mmer avatar Oct 12 '23 01:10 sh1mmer