View Single Post
Old 06-27-2014, 11:10 PM   #3042
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,043
Karma: 4604637
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by Amalthia View Post
When I downloaded this story: http://archiveofourown.org/works/1124782

The metadata it generated gave me this: a03 downloader, Avengers, Marvel, The Marvel (Marvel Movies), Thor

I bolded the part that should not be there.

These are my current settings:
First, when posting personal.ini settings, please use 'code', not 'quote' tags (it's the hash sign button). That way it preserves the spacing and we can copy & paste from each other without having to put all the spaces in at the beginning of lines.

Second, I'm not sure what's causing your problem precisely, but I can tell you how to significantly reduce your replacement list and fix the problem.

The key is that you're not using the power of the regular expressions to work for you. The character '.' in regexp means "any character". '*' means "zero or more of the previous character".

So you can put '.*' in your expressions and match anything instead of having a line for each possible version used.

You'll need to double check and test it, but I think this will work for all the cases you had before.

Code:
replace_metadata:
 fandoms=>Arrow \(TV 2012\)=>Arrow
 fandoms=>Batman \(Comic\)=>DCU
 fandoms=>Red Robin \(Comic\)=>DCU
 fandoms=>Harry Potter.*=>Harry Potter
 fandoms=>Hawaii Five-0 \(2010\)=>Hawaii Five-0
 fandoms=>Marvel.*=>Marvel
 fandoms=>Teen Wolf.*=>Teen Wolf
 fandoms=>Rise of the Guardians.*=>Rise of the Guardians
 fandoms=>Star Trek.*=>Star Trek
 fandoms=>Supernatural RPF=>Supernatural
 fandoms=>Iron Man=>Avengers
 fandoms=>.*(Captain America|Thor|Avengers|Agents of S.H.I.E.L.D.|X-Men|Spider-Man).*=>\1\,Marvel
(You may have realized that that means 'Agents of S.H.I.E.L.D.' will also match "Agents of SzHzIzEzLzDz". In general, you can escape '.' with '\.' like '(' and ')'. In that particular case, the odds hitting something else that also matches are so small as to be negligible.)
JimmXinu is offline