Skip to content
New issue

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

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

Already on GitHub? # to your account

Random tags and artists from e621 and danbooru #1593

Open
wants to merge 29 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
f2b9c53
Add files via upload
coffeegrind123 Feb 7, 2025
2867847
Add files via upload
coffeegrind123 Feb 7, 2025
89d79d3
Add files via upload
coffeegrind123 Feb 7, 2025
3b58528
Create FORK.md
coffeegrind123 Feb 7, 2025
6e90437
Add files via upload
coffeegrind123 Feb 7, 2025
c3541ad
Upload files
coffeegrind123 Feb 7, 2025
22266f2
Update FORK.md
coffeegrind123 Feb 7, 2025
e284372
Update FORK.md
coffeegrind123 Feb 7, 2025
f7c2a4d
Create README.md
coffeegrind123 Feb 7, 2025
0cf54ab
Update README.md
coffeegrind123 Feb 7, 2025
b985f7a
Symlink
coffeegrind123 Feb 7, 2025
bb5882d
Merge branch 'random-tags-and-artists' of https://github.com/coffeegr…
coffeegrind123 Feb 7, 2025
d811b66
asd
coffeegrind123 Feb 7, 2025
71239ef
symlink real
coffeegrind123 Feb 7, 2025
912eb44
Update FORK.md
coffeegrind123 Feb 7, 2025
8d01eef
Update FORK.md
coffeegrind123 Feb 7, 2025
8d4a455
Add files via upload
coffeegrind123 Feb 7, 2025
c4e72de
Update FORK.md
coffeegrind123 Feb 7, 2025
e00eb8a
Update FORK.md
coffeegrind123 Feb 7, 2025
036dd3f
Update FORK.md
coffeegrind123 Feb 7, 2025
ee2692c
screenshot
coffeegrind123 Feb 7, 2025
61ec9b9
Update FORK.md
coffeegrind123 Feb 7, 2025
3e7fdb5
Update FORK.md
coffeegrind123 Feb 7, 2025
4df2b6b
Add files via upload
coffeegrind123 Feb 7, 2025
b7a2d80
Update FORK.md
coffeegrind123 Feb 7, 2025
36937de
Update FORK.md
coffeegrind123 Feb 7, 2025
904dfd4
Update FORK.md
coffeegrind123 Feb 7, 2025
8a46d5a
Update FORK.md
coffeegrind123 Feb 7, 2025
0b60392
Update FORK.md
coffeegrind123 Feb 7, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/README.md
Binary file added .github/Screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/Screenshot2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
65 changes: 65 additions & 0 deletions FORK.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Random Artists and Tags Fork
![Screenshot of the plugin](Screenshot.png)
![Screenshot of the plugin](Screenshot2.png)

This fork adds functionality for randomly selecting artists and tags:
- Random artists button that pulls from:
- e621_artist_webui.csv
- danbooru_artist_webui.csv
- Random tags button that fetches tags from random posts on either site
- Customizable settings menu with:
- Categories list for filtering
- Unwanted tags exclusion list
- Favorite artists dropdown
- Solo-only checkbox, skip posts that don't fit this criteria

## Installation

1. Install the required Python dependencies (run PowerShell as administrator):
```powershell
python -m pip install beautifulsoup4 requests curl_cffi --target="C:\Program Files\Krita (x64)\lib\site-packages"
```

2. Download and install the correct cffi_backend package file manually (run in PowerShell as administrator):
```powershell
# Create a temporary directory
New-Item -ItemType Directory -Path "$env:TEMP\cffi_temp" -Force
Set-Location "$env:TEMP\cffi_temp"

# Download the wheel file using PowerShell's built-in web client
Invoke-WebRequest -Uri "https://files.pythonhosted.org/packages/d1/b6/0b0f5ab93b0df4acc49cae758c81fe4e5ef26c3ae2e10cc69249dfd8b3ab/cffi-1.17.1-cp310-cp310-win_amd64.whl" -OutFile "cffi.whl"

# Rename to zip and extract
Rename-Item -Path "cffi.whl" -NewName "cffi.zip"
Expand-Archive -Path "cffi.zip" -DestinationPath "."

# Copy the backend file to Krita python packages folder
Copy-Item -Path "_cffi_backend.cp310-win_amd64.pyd" -Destination "C:\Program Files\Krita (x64)\lib\krita-python-libs" -Force
```

**Note:** You must run PowerShell as administrator for these commands to work. These commands will automatically download and install the required CFFI backend file from Python's official package repository.

3. Extract the release to
```
%appdata%\krita\pykrita
```

## Usage

After installation, you'll see new buttons in the plugin interface:
- Random Artist: Selects a random artist from the included databases
- Random Tags: Fetches tags from random posts
- Settings: Configure filtering options and preferences
- Favorites: Quick access to your favorite artists
- Solo Only: Toggle to only include solo posts when fetching random tags

Configure your preferences in the Settings menu to customize the tag filtering and artist selection process.

## Troubleshooting

If you encounter permission errors:
- Make sure you're running PowerShell as administrator
- Check that Krita is not running during installation
- Verify the installation paths exist on your system

For other issues, please open an issue on the GitHub repository.
Binary file added _cffi_backend.cp310-win_amd64.pyd
Binary file not shown.
419,790 changes: 419,790 additions & 0 deletions ai_diffusion/danbooru_artist_webui.csv

Large diffs are not rendered by default.

205,489 changes: 205,489 additions & 0 deletions ai_diffusion/e621_artist_webui.csv

Large diffs are not rendered by default.

Loading