View Single Post
Old 07-29-2013, 02:34 AM   #1574
Jade Aislin
Groupie
Jade Aislin could sell banana peel slippers to a Deveel.Jade Aislin could sell banana peel slippers to a Deveel.Jade Aislin could sell banana peel slippers to a Deveel.Jade Aislin could sell banana peel slippers to a Deveel.Jade Aislin could sell banana peel slippers to a Deveel.Jade Aislin could sell banana peel slippers to a Deveel.Jade Aislin could sell banana peel slippers to a Deveel.Jade Aislin could sell banana peel slippers to a Deveel.Jade Aislin could sell banana peel slippers to a Deveel.Jade Aislin could sell banana peel slippers to a Deveel.Jade Aislin could sell banana peel slippers to a Deveel.
 
Posts: 164
Karma: 3100
Join Date: Sep 2011
Device: Kobo Auro H2O, PRS-T1
Quote:
Originally Posted by JimmXinu View Post
I can really only give you generalities because I've no idea what rules you're using--I just assume by now it's a HUGE rule set.
Yes, it is huge. Many of my fandoms have lots of characters who names needs to be fixed which is why I want to consolidate it.

If I am looking for a story in the fandom: Transformers, I don't want to have to search through: Transformers, Transformers/Beast Wars, and Transformers Generation one. Those first two are even from the same site (FFN). Nor do I want to search through multiple tags of the same character. That's what most of my regex code is for.

I thought if I could put the code in one place, I'll only need to adjust it when a site throws a new way to label a particular character. This would also reduce the amount of code I have.

Quote:
Originally Posted by JimmXinu View Post
If you truly can get all the rules you want for all the sites you read into one set of replace_metadata rules, then [defaults] is the best place for them, IMO.
Unfortunately, I finally figured out what was different about the code that did work for me.

I tested the code from an older personal ini which was under my FFN section:
Code:
replace_metatag:
 #Movie
 category=>Alice in Wonderland, 2010=>Alice in Wonderland (2010)
 
 category=>(Alice in Wonderland|^Avatar$)=>Movie.\1

 #Movie
   
 #Alice in Wonderland
 characters=>Alice K=>Movie.Alice in Wonderland.Alice Kingsleigh&&category=>Alice in Wonderland \(2010\)
I tested it under defaults, test site, and the original site (FFN, with an actual storyurl (http://www.fanfiction.net/s/7461968/1/)). The only one it worked under was FFN, where both the character (Alice K) and (Alice in Wonderland, 2010) converted to the way I wanted without extra code. Through some testing with the test site, it seems that the &&category is preventing the regex from working in any but active sites. Is this how it is supposed to work?

Because unfortunately, I need the &&category as I know of at least one set of character names (Sam W) that belong to two different fandoms (Transformers, Supernatural). Depending on which fandom the character belongs to, the regex will have different output.

Quote:
Originally Posted by JimmXinu View Post
The precedence order exists for those cases when you can't or don't want all your rules the same. For example, when you want different rules for different sites.
This sounds great. I can leave code that only applies to the one site in the sites section. That way, I'm not constantly reusing the same code for each site. If I could get the characters and ships to work in defaults with the &&category, I'd be all set.
Jade Aislin is offline