Adds yadisk - A script to download stuff from Yandex Disk

This commit is contained in:
Nemo 2020-04-13 16:49:55 +05:30
parent 8cfeea8ea9
commit 36b9ec0869
1 changed files with 10 additions and 0 deletions

10
yadisk Executable file
View File

@ -0,0 +1,10 @@
#!/bin/bash
# Run as yadisk "https://yadi.sk/...." [wget-options go here]
# eg: yadisk https://yadi.sk/i/gQpV5T7c3Ncvp4 -O file.png --quiet --no-clobber
LINK=$(curl "https://cloud-api.yandex.net:443/v1/disk/public/resources/download?public_key=$1" | jq -r '.href')
shift
if [[ "$LINK" != "null" ]]; then
wget --no-verbose "$LINK" "$@"
fi