View Single Post
Old 02-16-2025, 10:50 AM   #10365
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,045
Karma: 4604637
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by TaviCalderon View Post
the issue: i have set up a MultiSeries custom column, because the calibre default Series column/value field can only show one series. it seems to work, and the titlepages of each work also properly reflect each series [1] [2] etc. as defined by the rules i wrote in my ini. however, for some reason, i am incapable of making replace_metadata rules for multiseries. the works in question have two series tagged to them: one with a "- Recommended Reading Order" at the end of it. this is redundant, so i want to remove that series tag entirely.
First, this line is wrong:
Code:
include_in_series:true
The include_in_X mechanism is for changing what (other) metadata entries are included in X. Setting it 'true' is basically the same as removing the standard series value.

If that is your intention, I suggest clearing it explicitly instead:
Code:
include_in_series:
Quote:
Originally Posted by TaviCalderon View Post
i tried both of the below, and each seems to work when not being interfered with by stuff in my [defaults] ini:
These are both operating on series. "Recommended Reading Order" is in series01.

And you don't need both these exclude_metadata_pre and replace_metadata settings--just one or the other.

exclude_metadata_pre

While exclude_metadata_pre allows '=>' separators, '=~' is preferred. See wiki page. And the .* aren't needed in exclude_metadata_pre.

Code:
exclude_metadata_pre:
 series01,series02,series03,series04=~Recommended Reading Order
replace_metadata

Again, needs to operate on the correct entries:
Code:
replace_metadata:
 series01,series02,series03,series04=>.*Recommended Reading Order.*=>
However, instead of discarding the reading order list, I'd consider renaming it, since it is different:
Code:
replace_metadata:
 series01,series02,series03,series04=>.*(Recommended Reading Order).*(\[\d+\])$=>\1 \2
"The Accidental Warlord and His Pack - Recommended Reading Order [3]" becomes "Recommended Reading Order [3]".

This would conflict with other works having their own reading order series if put in a true series column, but you're putting it in a text column.

I'd also change the first #multiseries in custom_columns_settings to 'r' mode to clear the pre-existing value on update. Otherwise, since it's a text column, you might end up with duplicates. (Depending on the custom column type. A 'tags' type text column could mask that.)

Code:
custom_columns_settings:
 series00=>#multiseries,r
 series01=>#multiseries,a
 series02=>#multiseries,a
 series03=>#multiseries,a
 series04=>#multiseries,a
JimmXinu is offline   Reply With Quote