Created
January 26, 2025 11:57
-
-
Save CodeWithMa/557e360b491885edb9a748b72d0446c0 to your computer and use it in GitHub Desktop.
Download images from Civitai post with postId in clipboard
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/zsh | |
| if [[ -v WAYLAND_DISPLAY ]]; then | |
| clipboard="$(wl-paste)" | |
| else | |
| clipboard="$(xclip -o -selection c)" | |
| fi | |
| curl "https://civitai.com/api/v1/images?postId=$clipboard&nsfw=X" | jq -r '.items[].url' | while read line; do | |
| wget -c "$line" | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment