You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
423 B
Bash
10 lines
423 B
Bash
#!/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"
|