View Single Post
Old 10-25-2022, 10:11 AM   #7652
dailyalice
Geek of All Trades
dailyalice rocks like Gibraltar!dailyalice rocks like Gibraltar!dailyalice rocks like Gibraltar!dailyalice rocks like Gibraltar!dailyalice rocks like Gibraltar!dailyalice rocks like Gibraltar!dailyalice rocks like Gibraltar!dailyalice rocks like Gibraltar!dailyalice rocks like Gibraltar!dailyalice rocks like Gibraltar!dailyalice rocks like Gibraltar!
 
dailyalice's Avatar
 
Posts: 55
Karma: 100878
Join Date: Aug 2012
Location: Minneapolis
Device: Kindle Oasis (3rd gen)
This is not at all urgent or a big deal, it's just really weird and has me puzzled.

I change some category names via replace_metadata to normalize fandom names in my library and the items that should be changed to "Man from UNCLE" are being changed to "Man from Uncle" which has me stumped.

I've searched this thread for info on "case sensitive" and "capitalization" and similar but didn't find anything that seemed to apply.

Here's what I have under replace_metadata:
Code:
 category=>^([Tt]he )?[Mm]an [Ff]rom [Uu](.)?[Nn](.)?[Cc](.)?[Ll](.)?[Ee].*$=>Man from UNCLE
A bit ugly, but it seems to capture instances of "The Man from U.N.C.L.E. (2015)" as well as "The Man from U.N.C.L.E. (TV)" and "The Man from U.N.C.L.E." and "Man from UNCLE - fandom" and so on and so forth. (I've decided to let both the TV show and the movie all be the same category here so this should work for the movie and TV show.)

I know it's possible to have a new category that is all caps because I switch lots of categories to be simply "MCU" and that works fine. Unless for some weird reason all-caps only works if it's the first/only item . . .

And alright, I just went and changed a line in my personal.ini that changes Agents of S.H.I.E.L.D. to MCU to have it change that to Agents of SHIELD instead and when I updated a single story from Saved Metadata, it changed it to Agents of SHIELD just fine. So a fandom with that format is possible, clearly. I'm really stumped now.

Code:
 category=>^[Aa]gents [Oo]f [Ss](\.)?[Hh](\.)?[Ii](\.)?[Ee](\.)?[Ll](\.)?[Dd].*$=>Agents of SHIELD
The Agents of SHIELD line is a bit different because I escape most of the periods; I had UNCLE like that but changed it when I came across the fandom name of "Man from UNCLE - fandom" or something like that. (But none of this should matter, since the regex line checks out and is working and the change is happening, it's just giving me Uncle instead of UNCLE.)

I've also tried making the Man from UNCLE line the very first line under replace_metadata. I haven't yet made it the only thing under replace_metadata in a stripped down personal.ini, but I suppose I could try that.

I can live with it, it's not the end of the world if the fandom name is Man from Uncle versus Man from UNCLE, but it's puzzling and I thought I'd see if anyone had any ideas of what might be going on here.

I just tried another change. And this line does work:
Code:
 category=>^([Tt]he )?[Mm]an [Ff]rom [Uu](.)?[Nn](.)?[Cc](.)?[Ll](.)?[Ee].*$=>Man from U.N.C.L.E.
So I suppose I could go with that if I like the look of "Man from U.N.C.L.E." more than "Man from Uncle."

(But why isn't "Man from UNCLE" possible? So freaking weird.)

If anyone wants to see if they can replicate the issue in their own personal.ini, so far I've only been downloading UNCLE works from AO3. Here's the AO3 category for the UNCLE movie: https://archiveofourown.org/tags/The...20(2015)/works and for the TV show: https://archiveofourown.org/tags/The...*%20(TV)/works
dailyalice is offline   Reply With Quote