Skip to content

Instantly share code, notes, and snippets.

@CodeWithMa
CodeWithMa / downloadCivitaiPostFromClipboard.zsh
Created January 26, 2025 11:57
Download images from Civitai post with postId in clipboard
#!/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"