ソースを参照

massive redesign effort

openDir-d-2.0
HMSheets 5年前
コミット
42a2ec0c4e
7個のファイルの変更99行の追加24行の削除
  1. +7
    -0
      bin/exitchk
  2. +44
    -0
      bin/menu
  3. +23
    -0
      bin/title
  4. +3
    -0
      modules/wget/wget-dl_nc_np_norobots
  5. +14
    -0
      modules/wget/wget-dl_nc_np_norobots_typeaccept
  6. +0
    -24
      openDir-d
  7. +8
    -0
      openDir-d2

+ 7
- 0
bin/exitchk ファイルの表示

@@ -0,0 +1,7 @@
#!/usr/bin/env bash

exitchk () {
if [ ! $opt = "exit" ]; then null=0
else exit
fi
}

+ 44
- 0
bin/menu ファイルの表示

@@ -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
}

+ 23
- 0
bin/title ファイルの表示

@@ -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"
}

+ 3
- 0
modules/wget/wget-dl_nc_np_norobots ファイルの表示

@@ -0,0 +1,3 @@
#!/usr/bin/env bash

wget -e robots=off -r -nc -np $downDir $directory

+ 14
- 0
modules/wget/wget-dl_nc_np_norobots_typeaccept ファイルの表示

@@ -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!"
}

+ 0
- 24
openDir-d ファイルの表示

@@ -1,7 +1,5 @@
#!/usr/bin/env bash

#TestComment

#A fancy little wget script for downloading Open Directories
#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)"
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
while true; do
clear


+ 8
- 0
openDir-d2 ファイルの表示

@@ -0,0 +1,8 @@
#!/usr/bin/env bash

. ./bin/title
. ./bin/menu
. ./bin/exitchk

clear
menu

読み込み中…
キャンセル
保存