@@ -0,0 +1,7 @@ | |||||
#!/usr/bin/env bash | |||||
exitchk () { | |||||
if [ ! $opt = "exit" ]; then null=0 | |||||
else exit | |||||
fi | |||||
} |
@@ -0,0 +1,44 @@ | |||||
#!/usr/bin/env bash | |||||
menu () { | |||||
while [ active=1 ]; do | |||||
title | |||||
echo "Please select a Entry" | |||||
echo "" | |||||
shopt -s nullglob | |||||
moduleCat=(./modules/*) | |||||
x=0 | |||||
for entry in "${moduleEnt[@]}"; do | |||||
if [[ -d $entry ]]; then echo "$x:d - $entry" | |||||
else [[ -f $entry ]]; then echo "$x:f - $entry" | |||||
fi | |||||
x=$((x+1)) | |||||
done | |||||
echo "exit" | |||||
read opt | |||||
exitchk | |||||
entSelect=`echo ${moduleEnt[$opt]} | sed 's|./modules/|../|'` | |||||
submenu | |||||
clear | |||||
done | |||||
} | |||||
submenu () { | |||||
clear | |||||
while true; do | |||||
title | |||||
echo "Please select an Option from the $entSelect Category" | |||||
echo "" | |||||
shopt -s nullglob | |||||
moduleOpt=($moduleEnt[$opt]) | |||||
x=0 | |||||
for module in "${moduleOpt[@]}"; do | |||||
echo "$x - $module" | |||||
x=$((x+1)) | |||||
done | |||||
echo "back" | |||||
read opt | |||||
exitchk | |||||
clear | |||||
done | |||||
} |
@@ -0,0 +1,23 @@ | |||||
#!/usr/bin/env bash | |||||
#EOF allows the contents inside of be displayed as is and not affect the rest of the script | |||||
IFS='' read -r -d '' VAR <<-'EOF' | |||||
////////////////////////////////////////////////////////////////////////////// | |||||
\ ______ _ __ / | |||||
\ |_ _ `. (_) | ] / | |||||
\ .--. _ .--. .---. _ .--. | | `. \ __ _ .--. ______ .--.| | / | |||||
\ / .'`\ \[ '/'`\ \/ /__\\[ `.-. | | | | |[ | [ `/'`\]|______|/ /'`\' | / | |||||
\ | \__. | | \__/ || \__., | | | | _| |_.' / | | | | | \__/ | / | |||||
\ '.__.' | ;.__/ '.__.'[___||__]|______.' [___][___] '.__.;__] / | |||||
\ [__| / | |||||
////////////////////////////////////////////////////////////////////////////// | |||||
Version 1.0 | |||||
A Bash Script For Downloading Open Directories Using Wget | |||||
Written by HMSheets | |||||
------------------------------------------------------------------------------- | |||||
EOF | |||||
title() { | |||||
echo "$VAR" | |||||
} |
@@ -0,0 +1,3 @@ | |||||
#!/usr/bin/env bash | |||||
wget -e robots=off -r -nc -np $downDir $directory |
@@ -0,0 +1,14 @@ | |||||
#!/usr/bin/env bash | |||||
wget-dlaccept () { | |||||
moduleName="Wget-DL Accept File Type" | |||||
moduleVersion="0.1.0" | |||||
moduleToolUsed="Wget" | |||||
echo "Please provide the filetypes you would like to filter seaperated with a ','. (mkv,mp4,jpg,etc)" | |||||
read fileTypes | |||||
echo "Please provide the path to the file or directory you would like to download" | |||||
read directory | |||||
wget -e robots=off -r -nc -np --accept $downDir $directory | |||||
echo "Directory Download Complete!" | |||||
} |
@@ -1,7 +1,5 @@ | |||||
#!/usr/bin/env bash | #!/usr/bin/env bash | ||||
#TestComment | |||||
#A fancy little wget script for downloading Open Directories | #A fancy little wget script for downloading Open Directories | ||||
#preset wget options | #preset wget options | ||||
@@ -23,28 +21,6 @@ autoCloseMSG="Do you want the terminal to auto close upon task completion? y|n" | |||||
fileTypeMSG="Please provide the filetypes you would like to filter seaperated with a ','. (mkv,mp4,jpg,etc)" | fileTypeMSG="Please provide the filetypes you would like to filter seaperated with a ','. (mkv,mp4,jpg,etc)" | ||||
custDownDirMSG="Please provide your custom Download Directory" | custDownDirMSG="Please provide your custom Download Directory" | ||||
#EOF allows the contents inside of be displayed as is and not affect the rest of the script | |||||
IFS='' read -r -d '' VAR <<-'EOF' | |||||
////////////////////////////////////////////////////////////////////////////// | |||||
\ ______ _ __ / | |||||
\ |_ _ `. (_) | ] / | |||||
\ .--. _ .--. .---. _ .--. | | `. \ __ _ .--. ______ .--.| | / | |||||
\ / .'`\ \[ '/'`\ \/ /__\\[ `.-. | | | | |[ | [ `/'`\]|______|/ /'`\' | / | |||||
\ | \__. | | \__/ || \__., | | | | _| |_.' / | | | | | \__/ | / | |||||
\ '.__.' | ;.__/ '.__.'[___||__]|______.' [___][___] '.__.;__] / | |||||
\ [__| / | |||||
////////////////////////////////////////////////////////////////////////////// | |||||
Version 1.0 | |||||
A Bash Script For Downloading Open Directories Using Wget | |||||
Written by HMSheets | |||||
------------------------------------------------------------------------------- | |||||
EOF | |||||
title() { | |||||
echo "$VAR" | |||||
} | |||||
#main script start | #main script start | ||||
while true; do | while true; do | ||||
clear | clear | ||||
@@ -0,0 +1,8 @@ | |||||
#!/usr/bin/env bash | |||||
. ./bin/title | |||||
. ./bin/menu | |||||
. ./bin/exitchk | |||||
clear | |||||
menu |