View Single Post
Old 06-09-2014, 11:49 PM   #2887
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 JimmXinu View Post
I've been testing this and while introducing cycles doesn't cause infinite loops, the behavior isn't easily predicted.

But for straightforward cases, it seems to work as intended.

The attached version moves the in/exclude_metadata_post checks after the '{{,}}' splitting.
This is my original code:
Code:
replace_metadata:
 fandoms=>Marvel Cinematic Universe=>Marvel
 fandoms=>Thor \(Movies\)=>Thor
 fandoms=>Captain America \(Movies\)=>Captain America
 fandoms=>Captain America \(Movies\){{,}}Thor \(Movies\)=>Marvel
If I'm reading your directions accurately it looks like in order to add "Marvel" to any Thor and Captain America stories that do not list "Marvel Cinematic Universe" as a fandom, I would need to use this code instead:

Code:
replace_metadata:
 fandoms=>Marvel Cinematic Universe=>Marvel
 fandoms=>Thor \(Movies\)=>Thor
 fandoms=>Captain America \(Movies\)=>Captain America
 fandoms=>Thor \(Movies=>\)Thor{{,}}Marvel
I wasn't sure if I was supposed to leave in the word "category" that you had in your example?

Thanks for all your help on this,
Amalthia
Amalthia is offline