Quote:
Originally Posted by ownedbycats
A new question:
At what point exactly does add_category_when_multi_category run?
(I tried to search the thread but it doesn't work.)
Code:
## Add this category if there's more than one category(before this is added).
## Applied *after* category replace_metadata/include/exclude_metadata
I'm not sure whether that also includes the exclude_metadata_post, or whether to take Crossover into account when adding conditionals to other entries.
I have a few categories that I want to treat as not-crossovers but keep as separate entries (e.g. Half-Life and Portal are different games, but share the same universe) so thought that a conditional exclude_metadata_post could strip Crossover from those.
I think I brought up the idea of an ini setting to set certain categories as not-crossovers, but you said no.
|
Exactly? Here:
https://github.com/JimmXinu/FanFicFa...story.py#L1044
(There appears to be a typo in the comment that refers to genre instead of category.)
It occurs after replace/include/exclude, just like it says. When I say 'replace/include/exclude' I mean replace_metadata and all in/exclude_metadata_pre/post variants.
To the best of my understanding (without testing specific cases) it is part of
category when called in conditionals and Crossover (or whatever) will appear.
A exclude_metadata_post can't use
category as both the entry to operate on and the conditional key.
I suspect something like:
Code:
replace_metadata:
category_LIST=>^Crossover, (Half-Life, Portal)$=>\1
...is more appropriate.
I do not believe setting certain
category values as "not-crossovers" is as simple as you think it is. You would have to define each set of
category values anyway--doing it in regular expression is basically the same thing.
Quote:
Originally Posted by ownedbycats
also, a very minor low-priority QoL thing:
Would it be possible for the syntax highlighter to detect a use of regex after a == and then highlight it as a mistake? I keep using it instead of =~ and breaking things 
|
Basically, no. Where do you draw the line on what is a regexp? Anything with a '.*' in it? What about just '.'? Or '?' Or parens '()' anywhere in it?
And answering this has just taken ~25 minutes out of looking at your email dragging problem. So, trade-offs.