View Single Post
Old 03-21-2025, 10:03 AM   #10484
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: 7,043
Karma: 4604637
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Multi-reply

Quote:
Originally Posted by Firewolf88 View Post
I did figure out how to do it from the canonized tag, but is there a way I can use to also use each half on its own?

ie right now my line looks like
characters,ships,ships_CHARS=>(?i)Adrien Agreste \| Chat Noir$=>Adrien

is there a way to make it also catch just Adrien Agreste and just Chat Noir? Or do I need to just add more lines/do those ones manually?
It can probably be done it one line, but regex has to be very precise, a single misplaced character can break it. And there can be confusion of characters--regex uses the pipe (|), so to match it as part of the text, it has to be escaped to \|.

I haven't tested it, but something like this maybe?
Code:
 characters,ships,ships_CHARS=>(?i)(Adrien Agreste)?( \| )?(Chat Noir)?=>Adrien
If you don't understand regular expressions, it's probably easier to do multiple lines.

FYI, (?i) in python regex just means 'ignore case'.

Quote:
Originally Posted by ChaoticAdventure View Post
3. In Calibre, ONLY chapter 44 had the starting notes before the chapter. Chapter 45 did not. It didn't say "notes" before it, either: It was as if the notes were just part of the chapter text. I have since edited it out so I can't take a screenshot, unfortunately.
That's literally what it is. If you go look at chapter 44 on AO3, it has "Thank you again for all the reviews!" in both chapter notes AND at the beginning of the chapter text.
JimmXinu is offline   Reply With Quote