View Single Post
Old 08-03-2023, 03: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,
rework chapter tite tags ?

thanks for all the help with rework chapter headers.

after much help,
i now have books with chapter1, chapter 2 etc added as headers and in toc , but all the newly chapterized chapters lack a matching title tag.

chapter title tags are used by kobo to generate page headers on the device,when i send book to reader as kepubs, so Id like to fix them.

are there tools or is there a plugin to help, or is it a hard regex challenge?

to regex it- best way I can think of is
1) remove all existing title tags, using a find - replace all.
2. use regex to capture everything from the closing </head> tag thru to the new chapter headers, then manipulate that to slot in a new, populated chapter title tag just in front of the /head closure

{ i am guessing that multiple title tags in same file are bad, and that a single title tag can be anywhere in the <head> section }

i would then have to repair the damage done to title tags elsewhere in the books - maps, glossaries, title pages etc, if the step 1 replace all has wiped them out.

fools rush in, so I will wait a while for suggestions before starting that.
stumped is offline   Reply With Quote