Open KonoVitoDa opened 6 months ago
It is possible to combine conditions with and
and or
, and have them all in one big list:
"directory":
{
"type=='ugoira' and 0<=total_bookmarks<=1000":
["Pixiv", "{illust_ai_type!s:?##R2#AI#R1##R0##}", "ugoira", "{rating}", "0-1000 Bookmarks"],
"type=='ugoira' and 1000<=total_bookmarks":
["Pixiv", "{illust_ai_type!s:?##R2#AI#R1##R0##}", "ugoira", "{rating}", "1000+ Bookmarks"],
"'コイカツ' in tags and 0<=total_bookmarks<=1000":
["Pixiv", "Koikatsu", "{rating}", "0-1000 Bookmarks"],
"'コイカツ' in tags and 1000<=total_bookmarks":
["Pixiv", "Koikatsu", "{rating}", "1000+ Bookmarks"],
"0<=total_bookmarks<=1000":
["Pixiv", "{illust_ai_type!s:?##R2#AI#R1##R0##}", "{rating}", "0-1000 Bookmarks"],
"1000<=total_bookmarks":
["Pixiv", "{illust_ai_type!s:?##R2#AI#R1##R0##}", "{rating}", "1000+ Bookmarks"]
}
It is possible to combine conditions with
and
andor
, and have them all in one big list:"directory": { "type=='ugoira' and 0<=total_bookmarks<=1000": ["Pixiv", "{illust_ai_type!s:?##R2#AI#R1##R0##}", "ugoira", "{rating}", "0-1000 Bookmarks"], "type=='ugoira' and 1000<=total_bookmarks": ["Pixiv", "{illust_ai_type!s:?##R2#AI#R1##R0##}", "ugoira", "{rating}", "1000+ Bookmarks"], "'コイカツ' in tags and 0<=total_bookmarks<=1000": ["Pixiv", "Koikatsu", "{rating}", "0-1000 Bookmarks"], "'コイカツ' in tags and 1000<=total_bookmarks": ["Pixiv", "Koikatsu", "{rating}", "1000+ Bookmarks"], "0<=total_bookmarks<=1000": ["Pixiv", "{illust_ai_type!s:?##R2#AI#R1##R0##}", "{rating}", "0-1000 Bookmarks"], "1000<=total_bookmarks": ["Pixiv", "{illust_ai_type!s:?##R2#AI#R1##R0##}", "{rating}", "1000+ Bookmarks"] }
Oh, true, this is a good workaround. But I think it would still be better, cleaner and didactic if it worked the way I mentioned, mainly considering that in my case I actually use ten different total_bookmarks
ranges.
Does the above work for base-directory
?
No, conditions are currently only supported by filename
and directory
.
Ah, dang... I suppose I could symlink mount within the existing base directory 🤔
@mikf How would I define the directory that doesn't meet any of the above criteria? The catch-all directory that differs from the extractor's default.
With an empty string ""
or an expression that always evaluates to true
, like true
, 1
, 'any_string'
, etc.
"directory": {
"cond": ["conditional", "directory"],
"" : ["default", "directory"]
}
E.g.: If I'm on Pixiv and want to use a different directory structure just for ugoira, or if I want a new folder to be created if a given tag is present, it'd be really awesome if this could be achieved with something like this: