Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 12-07-2025, 04:45 PM   #11506
Clem2605
Connoisseur
Clem2605 began at the beginning.
 
Posts: 60
Karma: 10
Join Date: May 2020
Device: Kobo H2O, Kobo Libra H2O, Boox Tab Ultra C
Hi!

Something is happening in my replace_metadata section, and I have no clue what, I was wondering if someone could see something I don't.

In my relationship column, I put a 'fandom' prefix in front of each character names to be able to identify, sort and filter them easily. I do that in the replace_metadata section.
As an example: Jayce/Viktor (League of Legends) becomes (AR)Jayce/(AR)Viktor

A few days ago, when I downloaded some new works, nearly all characters had their fandom prefixes doubled: (AR) was (AR)(AR). I couldn't figure out why, I didn't remember making any change that would impact on this scale. Just in case, I tried to copy/paste from my 'safe' copy of my personal.ini, and it resolved the problem.
It shouldn't have, I never modify my personal.ini directly in FFF, I always modify first my copy, and then I copy and paste in the editor. In theory, those should be the same. Of course, I could have made some kind of mistake, so I let it go.

But now I see the error again with a single character, here is my replace_metadata line concerning the character:
Code:
 ships=>(?<!\(AC\))Viktor( \(((Arcane: )?League of Legends|Arcane)\))?=>(AC)Viktor&&category=>Arcane
Using that on Jayce/Viktor (League of Legends), I get Jayce/(AR)(AR)Viktor

I can't see how it would be able to select and replace Viktor twice?

Maybe I have another bit of code, elsewhere that is duplicating the fandom prefix? But then why would it affect only some characters with a fandom prefix?

Edit:
Just to make it clear: it doesn't seem to have any correlation to a specific fandom. When it first happened, some characters were unaffected while others with the same prefix were affected, and right now, I can only see the problem with one character, every other characters with the same prefix are fine.

Last edited by Clem2605; 12-07-2025 at 04:50 PM.
Clem2605 is offline   Reply With Quote
Old 12-07-2025, 05:03 PM   #11507
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,176
Karma: 5006097
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by Clem2605 View Post
Something is happening in my replace_metadata section, and I have no clue what, I was wondering if someone could see something I don't.
I'd need to see the entire setup and run some tests to have any real hope of identifying the issue. replace_metadata gets weird when you get into the corner cases.

You might consider using replace_metadata on ships_CHARS for this. I confess it isn't well documented, and only applies when sort_ships:true. Search the thread for some past examples.

From defaults.ini:
Code:
## Reorder ships so b/a and c/b/a become a/b and a/b/c. '/' is no
## longer hard coded and can be changed and added to with
## sort_ships_splits.
sort_ships:false

## Each line indicates first a regex that should be used to split each
## ships entry and then, after => the string to use to merge the parts
## back together.  \s == blank space.
## Each part will have replace_metadata with key ships_CHARS applied.
sort_ships_splits:
 [ ]*/[ ]*=>/
 [ ]*&amp;[ ]*=>\s&amp;\s
JimmXinu is offline   Reply With Quote
Old 12-07-2025, 06:10 PM   #11508
Clem2605
Connoisseur
Clem2605 began at the beginning.
 
Posts: 60
Karma: 10
Join Date: May 2020
Device: Kobo H2O, Kobo Libra H2O, Boox Tab Ultra C
Quote:
Originally Posted by JimmXinu View Post
I'd need to see the entire setup and run some tests to have any real hope of identifying the issue. replace_metadata gets weird when you get into the corner cases.
I thought so, I've attached the relevant part of my replace_metadata. I don't modify the ships data anywhere else.


Quote:
Originally Posted by JimmXinu View Post
You might consider using replace_metadata on ships_CHARS for this. I confess it isn't well documented, and only applies when sort_ships:true. Search the thread for some past examples.
I already sort the ships, so this wouldn't be an issue, but I would be hesitant to use ship_CHARS? Mostly because I know what it would fix, but not what it could break...
Attached Files
File Type: txt characters.txt (132.8 KB, 4 views)
Clem2605 is offline   Reply With Quote
Old Yesterday, 09:19 AM   #11509
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 11,394
Karma: 80947541
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Small glitch: On this story, the subheadings start with numbers. When downloaded with FFF, the numbers are all 1.
ownedbycats is offline   Reply With Quote
Old Yesterday, 11:20 AM   #11510
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,176
Karma: 5006097
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by ownedbycats View Post
Small glitch: On this story, the subheadings start with numbers. When downloaded with FFF, the numbers are all 1.
Add start to add_to_keep_html_attrs.

Code:
<ol start="3">
<li>

<p>Emotion</p></li>
</ol>
JimmXinu is offline   Reply With Quote
Old Yesterday, 12:44 PM   #11511
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,176
Karma: 5006097
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by Clem2605 View Post
I thought so, I've attached the relevant part of my replace_metadata. I don't modify the ships data anywhere else.
Story URL? Because you've posted 2000 odd lines of configuration and I'm not testing all of them.
JimmXinu is offline   Reply With Quote
Old Today, 02:37 AM   #11512
Amalthia
Wizard
Amalthia ought to be getting tired of karma fortunes by now.Amalthia ought to be getting tired of karma fortunes by now.Amalthia ought to be getting tired of karma fortunes by now.Amalthia ought to be getting tired of karma fortunes by now.Amalthia ought to be getting tired of karma fortunes by now.Amalthia ought to be getting tired of karma fortunes by now.Amalthia ought to be getting tired of karma fortunes by now.Amalthia ought to be getting tired of karma fortunes by now.Amalthia ought to be getting tired of karma fortunes by now.Amalthia ought to be getting tired of karma fortunes by now.Amalthia ought to be getting tired of karma fortunes by now.
 
Amalthia's Avatar
 
Posts: 1,201
Karma: 588454
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
Hi, I apologize if this sounds like a dumb question but do we add the logpage information under [defaults] or [archiveofourown.org]?

I used the below code in the [archiveofourown.org] section of FFF personal.ini.

Code:
include_logpage: smart
logpage_entries: dateCreated,datePublished,dateUpdated,numChapters,numWords
It's been two updates for some stories and I don't see a logpage in the file. I'm not sure where this information is stored?

I read the "defaults" page and it sounds like the logpage is supposed to show up before the storytext but I'm not seeing it in the "edit" of the "In-Progress" stories.

Thanks for your patience with all my questions.

Amalthia
Amalthia is offline   Reply With Quote
Old Today, 10:35 AM   #11513
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,176
Karma: 5006097
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by Amalthia View Post
Hi, I apologize if this sounds like a dumb question but do we add the logpage information under [defaults] or [archiveofourown.org]?
[epub]

Or [archiveofourown.org:epub] if you don't want it for other sites.

From defaults.ini:
Spoiler:
Code:
[epub]

## Each output format has a section that overrides [defaults]

## As of Jan 2020, FanFicFare can output either epub 2.0 or 3.0 (with
## backward compatibility toc.ncx file).  2.0 will still be the
## default for now.
epub_version:2.0

## epub is already a zip file.
zip_output: false

## epub carries the TOC in metadata.
## mobi generated from epub by calibre will have a TOC at the end.
include_tocpage: false
## When set to 'true', tocpage is only included if there is more than
## one chapter in the story.  If set to 'always', tocpage will be
## included even if the story only has one chapter.
#include_tocpage: always

## include a Update Log page before the story text.  If 'true', the
## log will be updated each time the epub is and all the metadata
## fields that have changed since the last update (typically
## dateUpdated,numChapters,numWords at a minimum) will be shown.
## Great for tracking when chapters came out and when the description,
## etc changed.
include_logpage: false
## If set to 'smart', logpage will only be included if the story is
## status:In-Progress or already had a logpage.  That way you don't
## end up with Completed stories that have just one logpage entry.
#include_logpage: smart
JimmXinu is offline   Reply With Quote
Old Today, 03:33 PM   #11514
Amalthia
Wizard
Amalthia ought to be getting tired of karma fortunes by now.Amalthia ought to be getting tired of karma fortunes by now.Amalthia ought to be getting tired of karma fortunes by now.Amalthia ought to be getting tired of karma fortunes by now.Amalthia ought to be getting tired of karma fortunes by now.Amalthia ought to be getting tired of karma fortunes by now.Amalthia ought to be getting tired of karma fortunes by now.Amalthia ought to be getting tired of karma fortunes by now.Amalthia ought to be getting tired of karma fortunes by now.Amalthia ought to be getting tired of karma fortunes by now.Amalthia ought to be getting tired of karma fortunes by now.
 
Amalthia's Avatar
 
Posts: 1,201
Karma: 588454
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
Quote:
Originally Posted by JimmXinu View Post
[epub]

Or [archiveofourown.org:epub] if you don't want it for other sites.

From defaults.ini:
Spoiler:
Code:
[epub]

## Each output format has a section that overrides [defaults]

## As of Jan 2020, FanFicFare can output either epub 2.0 or 3.0 (with
## backward compatibility toc.ncx file).  2.0 will still be the
## default for now.
epub_version:2.0

## epub is already a zip file.
zip_output: false

## epub carries the TOC in metadata.
## mobi generated from epub by calibre will have a TOC at the end.
include_tocpage: false
## When set to 'true', tocpage is only included if there is more than
## one chapter in the story.  If set to 'always', tocpage will be
## included even if the story only has one chapter.
#include_tocpage: always

## include a Update Log page before the story text.  If 'true', the
## log will be updated each time the epub is and all the metadata
## fields that have changed since the last update (typically
## dateUpdated,numChapters,numWords at a minimum) will be shown.
## Great for tracking when chapters came out and when the description,
## etc changed.
include_logpage: false
## If set to 'smart', logpage will only be included if the story is
## status:In-Progress or already had a logpage.  That way you don't
## end up with Completed stories that have just one logpage entry.
#include_logpage: smart
Thank you for your help. It appears next time I should scroll up a little more! The log page is now in my ebook file when I view it with the Edit Book plugin.

Thanks for your help!
Amalthia
Amalthia is offline   Reply With Quote
Reply

Tags
fanfiction


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] KindleUnpack - The Plugin DiapDealer Plugins 527 08-15-2025 02:36 PM
[GUI Plugin] Open With kiwidude Plugins 404 02-21-2025 06:42 AM
[GUI Plugin] Marvin XD Philantrop Plugins 126 01-29-2017 01:48 PM
[GUI Plugin] KiNotes -axel- Plugins 0 07-14-2013 07:39 PM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 01:27 PM


All times are GMT -4. The time now is 08:24 PM.


MobileRead.com is a privately owned, operated and funded community.