Skip to content

SiliconeShojo/DanbooruScraper

Repository files navigation

Danbooru Tag Scraper


Application Interface Preview



A desktop utility designed to automatically harvest Danbooru character tags, filter for visual traits, and build structured YAML wildcard libraries for Stable Diffusion.



🚀 Why Use This?

Manually copying character tags (Hair color, eye color, costume specifics) for hundreds of characters is tedious. This tool automates the entire process:

  1. Input a Series (e.g., genshin impact).
  2. Fetch every character in that series.
  3. Scrape their visual traits (Hair, Eyes, Wings, Horns, etc.).
  4. Export a clean, ready-to-use YAML file for your wildcard library.

✨ Key Features

🌲 Recursive Hierarchy Engine

Traverses Series (Copyright) -> Character -> Traits.

  • Example: Genshin ImpactRaiden Shogunlong hair, purple hair, purple eyes, large breasts, mole, braid.

🔍 Smart Prompt Filtering

  • Noise Reduction: Automatically filters out non-descriptive tags. Focuses strictly on physical attributes (hair color, eye color, animal ears, etc.).
  • Consistency Checks: Prioritizes specific posts (tagged with 1girl, 1boy, or solo) to ensure the tags represent the character's core design rather than a niche variant.

💾 Wildcard-Ready Export (YAML)

Generates structured YAML files compatible with combinatorial prompt generation.

  • Dynamic Root Keys: Customize the top-level key (e.g., set to __character__ for immediate use).
  • Merge Functionality: Update your existing wildcard lists without wiping out manual changes.

🛠️ Installation & Build

Prerequisites

Important

You must have the .NET 8.0 SDK installed to build or run this application.

Quick Build

This project includes a GitHub Actions workflow for automated cross-platform builds. To build manually:

Windows

dotnet publish -c Release -r win-x64 -p:PublishSingleFile=true --self-contained true -o ./publish/win

Linux

dotnet publish -c Release -r linux-x64 -p:PublishSingleFile=true --self-contained true -o ./publish/linux

macOS (Apple Silicon)

dotnet publish -c Release -r osx-arm64 -p:PublishSingleFile=true --self-contained true -o ./publish/mac-arm

macOS (Intel)

dotnet publish -c Release -r osx-x64 -p:PublishSingleFile=true --self-contained true -o ./publish/mac-intel

Note

The build commands above generate a portable executable in the ./publish folder with all dependencies embedded. No installation required!

📖 Usage Guide

1. Fetch

Type the target copyright tag (e.g., pokemon, blue archive) into the search field and click Fetch.

2. Curate

A tree view will populate with found characters.

  • Check the characters you want to include in your wildcard.
  • Uncheck generic or unwanted entries (e.g., pokemon_(creature)).

3. Process

Click Process. The tool will scrape the most descriptive tags for every selected character.

Tip

Monitor the Debug Log overlay or the console for real-time scraping status.

4. Export to Wildcards

Click Export YAML.

  • Root Key: Enter the trigger word you want to use in your prompts (e.g., my_characters).
  • Save: The resulting file can be placed directly into your Dynamic Prompts wildcards directory.

Example Output:

Genshin Impact:
  - Amber: brown eyes, long hair, ribbon, goggles...
  - Lisa: green eyes, witch hat, purple dress...

👏 Acknowledgements

Powered by the open-source community:



Moe Counter
Thanks for visiting!

About

A desktop utility designed to automatically harvest Danbooru character tags.

Topics

Resources

Stars

Watchers

Forks

Sponsor this project

Contributors

Languages