mirror of
https://github.com/pikami/sysadmin.git
synced 2024-11-24 12:45:45 +00:00
Added 'Adobe Connect' downloader script
This commit is contained in:
parent
f6cd1a0157
commit
163e1c08a0
4
misc/README.md
Normal file
4
misc/README.md
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# /sysadmin/misc
|
||||||
|
#### Random scripts to automate tasks
|
||||||
|
## Scripts
|
||||||
|
* `ac_downloader.sh` - Download stuff from 'Adobe Connect'
|
19
misc/ac_downloader.sh
Executable file
19
misc/ac_downloader.sh
Executable file
@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ $# -lt 1 ]; then
|
||||||
|
echo "Usage: $0 https://my.adobeconnect.com/video_id";
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
valid='http[s:\/]+[a-zA-Z0-9.]+\/[a-zA-Z0-9]+$';
|
||||||
|
if [[ $1 =~ $valid ]]; then
|
||||||
|
readarray -d / -t str_arr <<< "$1"
|
||||||
|
id="$(echo -e "${str_arr[3]}" | tr -d '[:space:]')";
|
||||||
|
dl_url="$1/output/$id.zip?download=zip";
|
||||||
|
echo "Downloading $dl_url";
|
||||||
|
wget -O "$id.zip" $dl_url;
|
||||||
|
else
|
||||||
|
echo "URL is not the correct format";
|
||||||
|
exit 1;
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in New Issue
Block a user