Improve basic chapter_title_strip_pattern, add warnings for same.

This commit is contained in:
Jim Miller 2015-12-06 20:10:32 -06:00
parent f220be69de
commit e7a1560734
2 changed files with 18 additions and 4 deletions

View file

@ -299,14 +299,21 @@ add_chapter_numbers:false
## "1: Start" => "Start"
## "2, Chapter the second" => "Chapter the second"
## etc
chapter_title_strip_pattern:^[0-9]+[\.: -]+
## Leaves unchanged "1.1" or "1"
## Note that your ToC entry(ies) may be empty if the
## chapter_title_strip_pattern removes everything and you don't have
## add_chapter_numbers:true.
chapter_title_strip_pattern:^[0-9]+[\.: -]+(?=[^0-9]|$)
## This version will strip all of the above *plus* remove 'Chapter 1':
## This version remove leading numbers and 'Chapter 1':
## "Chapter 1" => ""
## "1. Chapter 1" => ""
## "1. Chapter 1, Bob's First Clue" => "Bob's First Clue"
## "Chapter 2 - Pirates Place" => "Pirates Place"
## etc
## Note that your ToC entry(ies) may be empty if the
## chapter_title_strip_pattern removes everything and you don't have
## add_chapter_numbers:true.
#chapter_title_strip_pattern:^([0-9]+[\.: -]+)?(Chapter *[0-9]+[\.:, -]*)?
## If true, when updating an epub that already has old chapters, new

View file

@ -308,14 +308,21 @@ add_chapter_numbers:false
## "1: Start" => "Start"
## "2, Chapter the second" => "Chapter the second"
## etc
chapter_title_strip_pattern:^[0-9]+[\.: -]+
## Leaves unchanged "1.1" or "1"
## Note that your ToC entry(ies) may be empty if the
## chapter_title_strip_pattern removes everything and you don't have
## add_chapter_numbers:true.
chapter_title_strip_pattern:^[0-9]+[\.: -]+(?=[^0-9]|$)
## This version will strip all of the above *plus* remove 'Chapter 1':
## This version remove leading numbers and 'Chapter 1':
## "Chapter 1" => ""
## "1. Chapter 1" => ""
## "1. Chapter 1, Bob's First Clue" => "Bob's First Clue"
## "Chapter 2 - Pirates Place" => "Pirates Place"
## etc
## Note that your ToC entry(ies) may be empty if the
## chapter_title_strip_pattern removes everything and you don't have
## add_chapter_numbers:true.
#chapter_title_strip_pattern:^([0-9]+[\.: -]+)?(Chapter *[0-9]+[\.:, -]*)?
## If true, when updating an epub that already has old chapters, new