View Single Post
Old 06-08-2014, 10:43 PM   #2868
Amalthia
Wizard
Amalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beauty
 
Amalthia's Avatar
 
Posts: 1,188
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
Quote:
Originally Posted by davidfor View Post
You can use the same test in the replace_metadata more than once. You could try something like:

Code:
replace_metadata:
 fandoms=>Thor \(Movies\)=>Thor
 fandoms=>Thor \(Movies\)=>Marvel Cinematic Universe
 fandoms=>Captain America \(Movies\)=>Captain America 
 fandoms=>Captain America \(Movies\)=>Marvel Cinematic Universe
Another way to do this is:
Code:
replace_metadata:
 fandoms=>Thor \(Movies\)=>Thor
 fandoms=>Captain America \(Movies\)=>Captain America 
 fandoms=>(Thor|Captain America|Iron Man) \(Movies\)=>Marvel Cinematic Universe
The match is done using a regular expression. That makes the matching very powerful.

The thing that I fell is missing for this is being able to supply more that one tag. There have been a couple of times where what I really wanted was to split the found tag into two. The solution was to put two lines in, but it does mean I have two copies of the same match string to maintain if things change.
Hi,

I tried both options and neither worked. I think what I have now is a good step forward and I can manually add the "Marvel" tag to the stories that don't already have one if need be.

Thanks,
Amalthia
Amalthia is offline