Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to create a directory for specific tags #6842

Closed
NitroGhoul opened this issue Jan 16, 2025 · 2 comments
Closed

Is it possible to create a directory for specific tags #6842

NitroGhoul opened this issue Jan 16, 2025 · 2 comments

Comments

@NitroGhoul
Copy link

Say i'm scraping any booru site, would it be possible to separate posts that have certain tags/words into another directory. Like, a post tagged with "animated" or "knight" into their own folders, but everything else goes where it normally does. Also group certain tags together like "group, threesome, 4some, etc" into their own directory folder.

      `"filename": "{tag_string_artist}_{tag_string_general[b:180]}_{num:>02}_{id}.{extension}",
       "directory": ["{category}", "{tag_string_artist}", "{tag_string_copyright}", "{tag_string_character}"]`

is what I'm currently using.

Apologies if what I'm asking for isn't exactly clear.

@Hrxn
Copy link
Contributor

Hrxn commented Jan 17, 2025

Conditional directory setting, like this, for example:

            "directory": {
                "'animated' in tags"                                   : ["Animations"],
                "re.search('knight|sword', description, re.IGNORECASE)": ["Medieval Stuff", "{user}"],
                ""                                                     : ["Normal", "Directory", "Here", "{user[name]}"]
            },

@NitroGhoul
Copy link
Author

Conditional directory setting, like this, for example:

        "directory": {
            "'animated' in tags"                                   : ["Animations"],
            "re.search('knight|sword', description, re.IGNORECASE)": ["Medieval Stuff", "{user}"],
            ""                                                     : ["Normal", "Directory", "Here", "{user[name]}"]
        },

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants