new file: image-download

master
nihonium 3 years ago
parent 6b7b4f5ed9
commit edbb3faa9c

@ -0,0 +1,9 @@
#!/bin/sh
# Script for downloading images without extension in qutebrowser (For example, images from Misskey)
# You should bind "hint links spawn --userscript image-download {hint-url}" (to ',d' for example)
# Downloaded images located at Downloads directory
cd ~/Downloads
EXT=$(wget $1 2>&1 | grep "image" | grep -oP '\[\K[^\]]+' | grep -oP '.*image/\K.*')
FILE=$(echo "$1" | grep -oP '.*/\K.*')
mv "$FILE" "$FILE.$EXT"
Loading…
Cancel
Save