View Single Post
Old 09-27-2024, 12:00 PM   #9985
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,997
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by Clem2605 View Post
I didn't reset the chapter start, the only only toc-related changes I make, that I can think about, are my chapter_title_strip/add/addnew code:

Code:
strip_chapter_numbers:true
add_chapter_numbers:true
chapter_title_strip_pattern:^([0-9]+[\.: -]+)?(Chapter *[0-9]+[\.:, -]*)?
chapter_title_add_pattern:Chapter ${number}${title:|: |}
chapter_title_addnew_pattern:Chapter ${number}${title:|: |} | New <3
mark_new_chapters:true
And I modify it in the AO3 section with:
Code:
chapter_title_add_pattern:Chapter ${number}${title:|: |} ◈ ${date}
chapter_title_addnew_pattern:Chapter ${number}${title:|: |} ◈ ${date} | New <3
Otherwise, there is my 'titlepage_start' code, but I didn't modify the <head> part of the HTML, so nothing that should impact the toc.
The problem is the ${title:|: |}.

The chapter title pattern uses Python's Template object from it's string module.

The :|: | part of that is, I assume, copied from Calibre's templating language which has additional features.

This works:
Code:
chapter_title_add_pattern:Chapter ${number} ${title} ◈ ${date}
chapter_title_addnew_pattern:Chapter ${number} ${title} ◈ ${date} | New <3
JimmXinu is offline   Reply With Quote