summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MANIFEST3
-rwxr-xr-xdate-convert5
-rwxr-xr-xdate-reverse5
-rwxr-xr-xtimer3
-rwxr-xr-xytdl88
5 files changed, 60 insertions, 44 deletions
diff --git a/MANIFEST b/MANIFEST
index 3951542..13e2fc6 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -4,6 +4,8 @@
#bulk-rename-from-file|symlink|.local/bin
#combine-videos|symlink|.local/bin
#convert-to-webm|symlink|.local/bin
+#date-convert|symlink|.local/bin
+#date-reverse|symlink|.local/bin
#depchk|symlink|.local/bin
#dict|symlink|.local/bin
#fomm|symlink|.local/bin
@@ -32,6 +34,7 @@
#space-ahk|symlink|.local/bin
#statusbar|symlink|.local/bin
#tag-tracks|symlink|.local/bin
+#timer|symlink|.local/bin
#vhs|symlink|.local/bin
#vm-kali|symlink|.local/bin
#vm-win|symlink|.local/bin
diff --git a/date-convert b/date-convert
new file mode 100755
index 0000000..398a857
--- /dev/null
+++ b/date-convert
@@ -0,0 +1,5 @@
+#!/usr/bin/env bash
+
+for i in "$@"; do
+ perl-rename 's/([0-9][0-9][0-9][0-9])([0-9][0-9])([0-9][0-9])/$1-$2-$3/' "${i}"
+done
diff --git a/date-reverse b/date-reverse
new file mode 100755
index 0000000..28f2e6b
--- /dev/null
+++ b/date-reverse
@@ -0,0 +1,5 @@
+#!/usr/bin/env bash
+
+for i in "$@"; do
+ perl-rename 's/([0-9][0-9])-([0-9][0-9])-([0-9][0-9][0-9][0-9])/$3-$1-$2/' "${i}"
+done
diff --git a/timer b/timer
new file mode 100755
index 0000000..711d560
--- /dev/null
+++ b/timer
@@ -0,0 +1,3 @@
+#!/usr/bin/env bash
+
+sowon -e $1 && alert
diff --git a/ytdl b/ytdl
index f3969a4..88b6508 100755
--- a/ytdl
+++ b/ytdl
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
help() {
- echo -e "
+ echo -e "
Usage: ytdl [-h|-m|-a|-r|-c|-n fileName|-u URL]
Multipurpose bash script for yt-dlp. Provides options to choose between
@@ -12,13 +12,13 @@ can also explicitly specify a URL.
Defaults to downloading videos.
Options:
- -h Display this help message
- -m Download music, save to /media/hdd/music/Youtube Downloads/
- -a Archive video, save to /media/seagate/vids/archives/%(uploader)s/
- -r Download very short reaction clip, save to /media/hdd/pics/reactions/gif/
- -c Passes cookies from firefox to download age-restricted content
- -n Specify file name
- -u Specify URL
+ -h Display this help message
+ -m Download music, save to /media/hdd/music/Youtube Downloads/
+ -a Archive video, save to /media/seagate/vids/archives/%(uploader)s/
+ -r Download very short reaction clip, save to /media/hdd/pics/reactions/gif/
+ -c Passes cookies from firefox to download age-restricted content
+ -n Specify file name
+ -u Specify URL
"
}
@@ -33,42 +33,42 @@ filename="%(title)s"
opts="--remux-video mkv"
while getopts ":hmarcn:u:" option; do
- case $option in
- h) # print help
- help
- exit
- ;;
- m) # download music
- path="/media/hdd/music/Youtube Downloads/"
- opts="-x --audio-format mp3 --download-archive $HOME/.config/yt-dlp/history.txt"
- ;;
- a) # archive video
- path="/media/seagate/vids/archives/%(uploader)s/"
- filename="%(upload_date)s - %(title)s"
- opts="$opts --download-archive $HOME/.config/yt-dlp/history.txt"
- ;;
- r) # download reaction clip
- path="/media/hdd/pics/reactions/gif/"
+ case $option in
+ h) # print help
+ help
+ exit
+ ;;
+ m) # download music
+ path="/media/hdd/music/Youtube Downloads/"
+ opts="-x --audio-format mp3 --download-archive $HOME/.config/yt-dlp/history.txt"
+ ;;
+ a) # archive video
+ path="/media/seagate/vids/archive/%(uploader)s/"
+ filename="%(upload_date)s - %(title)s"
+ opts="$opts --download-archive $HOME/.config/yt-dlp/history.txt"
+ ;;
+ r) # download reaction clip
+ path="/media/hdd/pics/reactions/gif/"
opts="--recode-video webm"
- ;;
- c) # pass cookies for age restricted content
- opts="$opts --cookies-from-browser firefox"
- ;;
- n) # set filename
- filename=$OPTARG
- ;;
- u) # set url
- url=$OPTARG
- ;;
- \?) #invalid option
- echo "Error: Invalid option -$OPTARG" >&2
- exit 1
- ;;
- :) # empty optarg
- echo "Option -$OPTARG requires an argument" >&2
- exit 1
- ;;
- esac
-done
+ ;;
+ c) # pass cookies for age restricted content
+ opts="$opts --cookies-from-browser firefox"
+ ;;
+ n) # set filename
+ filename=$OPTARG
+ ;;
+ u) # set url
+ url=$OPTARG
+ ;;
+ \?) #invalid option
+ echo "Error: Invalid option -$OPTARG" >&2
+ exit 1
+ ;;
+ :) # empty optarg
+ echo "Option -$OPTARG requires an argument" >&2
+ exit 1
+ ;;
+ esac
+''done
yt-dlp -o "$path$filename.%(ext)s" $opts $url