View Single Post
Old 10-09-2016, 03:03 PM   #1533
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,045
Karma: 4604637
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by ILB View Post
For several fandoms there are different categories (for example based on the book or the movie/series or repeatedly filmed series/movies) :
Sherlock = at fanfiction.net itīs mostly used for the BBC series
Sherlock Holmes = itīs mostly for the Books from A.C. Doyle or maybe some of the older tv series
To make a consistent search possible I even the category by
" category=>^Sherlock$=>Sherlock Holmes(All Media Types)&&category=>^Sherlock$ "
in my personal.ini

Iīd like to maintain this new category but also want to keep the original classification and/or to add an (or more) additional category, like "Sherlock Holmes (BBC)".

(Or would it be an easier/better possibility to make a top category and use the original classifications as an subcategory? )
Code:
 category=>^Sherlock$=>Sherlock Holmes(All Media Types)&&category=>^Sherlock$
You can't use the same metadata key word (category) in both the replacement part (before &&) and the conditional part (after &&) of a replace line. Also, it isn't needed in this case. The replacement part does the same thing the conditional would.

I think you want something more like:
Code:
 category=>^(.*Sherlock.*)$=>Sherlock Holmes(All Media Types)\,\1
That says: "Any category that contains 'Sherlock' with anything before and/or anything after it, change to two entries, 'Sherlock Holmes(All Media Types)' and whatever it was before (the '\1').

I don't use hierarchical tags, but from what I understand, you could do this:
Code:
 category=>^(.*Sherlock.*)$=>Sherlock Holmes(All Media Types).\1
JimmXinu is offline   Reply With Quote