View Single Post
Old 05-06-2017, 02:09 AM   #1
stumped
Wizard
stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.
 
Posts: 3,305
Karma: 10259306
Join Date: May 2016
Device: kobo forma, Kobo Libra, Huawei media Tab, fire HD10, PW3 HDX8.9,
Question best way to add numbered chapters to a book with no chapters

in this case, the retail epub version of Wilbur Smith - War Cry. no headers, no chapters, just 200 ish pages of text with scene breaks.

i was able to do it in a very convoluted way involving find the scene break style, regex it into having a h2 and add the text" chapter", then generate a new toc, then convert the book in calibre to get toc classes assigned, then regex those to extract a number to use as a chapter number

there is surely a slicker and sigil only way ? - a plug in ??
start point - a book with no chapters, just scenes- the entire story is in a single xhtml ( others just contain also by, dedications etc )
target : a book with numbered chapters and one xhtml file per chapter
stumped is offline   Reply With Quote