add more scripts.

This commit is contained in:
Lukáš Kucharczyk 2020-08-02 14:32:50 +02:00
parent d77b700133
commit 5ca4ef3f5a
4 changed files with 63 additions and 0 deletions

9
adddbmetadata.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash
mkdir edited
for file in *.mkv; do
ffmpeg -i $file -map 0 \
-metadata:s:a:0 language=eng -metadata:s:a:0 title="English" \
-metadata:s:a:1 language=jpn -metadata:s:a:1 title="Japanese" \
-c copy ./edited/$file
done

6
renamedb.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/bash
prename 's/ /\./g' *
prename "s/'//g" *
prename "s/\!//g" *
prename 's/Dragon\.Ball\.-\.//g' *
prename "s/\.-\./_/g" *

41
youtube-dl-script.sh Executable file
View File

@ -0,0 +1,41 @@
#!/run/current-system/sw/bin/bash
export DEFAULT_PLAYLIST_END=10
download_single() {
youtube-dl "$1" \
--download-archive "~/Videos/YT/history.conf" \
--prefer-free-formats\
--write-description \
--output "~/Videos/YT/%(uploader)s/%(upload_date)s - %(title)s.%(ext)s"
}
export -f download_single
download() {
youtube-dl "$1" \
--download-archive "~/Videos/YT/history.conf" \
--prefer-free-formats\
--playlist-end $2 \
--write-description \
--output "~/Videos/YT/%(uploader)s/%(upload_date)s - %(title)s.%(ext)s"
}
export -f download
download_user() {
download "https://www.youtube.com/user/$1" ${2-$DEFAULT_PLAYLIST_END}
}
export -f download_user
download_channel() {
download "https://www.youtube.com/channel/$1" ${2-DEFAULT_PLAYLIST_END}
}
export -f download_channel
download_playlist() {
download "https://www.youtube.com/playlist?list=$1" ${2-DEFAULT_PLAYLIST_END}
}
export -f download_playlist

7
youtube-dl.sh Executable file
View File

@ -0,0 +1,7 @@
#!/run/current-system/sw/bin/bash
youtube-dl "$1" \
--download-archive "~/Videos/YT/history.conf" \
--prefer-free-formats\
--write-description \
--output "~/Videos/YT/%(uploader)s/%(upload_date)s - %(title)s.%(ext)s"