summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2018-03-11 18:57:49 +0100
committerlassulus <lassulus@lassul.us>2018-03-11 18:57:49 +0100
commit608857af5ba9c7f4a421bf3ec6ad3cdd1ff707b2 (patch)
treea26d19678217f09a8f9a2927800f6ab86a8ab75c /bin
parent00b1d065a36a9800a9f8a8f6af30f90a006c9251 (diff)
shell.nix: run on all nix systems
Diffstat (limited to 'bin')
-rwxr-xr-xbin/checkMissing9
-rwxr-xr-xbin/checkMissingLink13
-rwxr-xr-xbin/checkMissingmp39
-rwxr-xr-xbin/ogg-maker16
-rwxr-xr-xbin/ogg2mp315
-rwxr-xr-xbin/yout2mp324
-rwxr-xr-xbin/yout2ogg24
-rwxr-xr-xbin/youtplaylist2
8 files changed, 0 insertions, 112 deletions
diff --git a/bin/checkMissing b/bin/checkMissing
deleted file mode 100755
index f53549c..0000000
--- a/bin/checkMissing
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-
-uri=$1
-musicDir=${musicDir-./}
-id=$(echo "$uri" | sed -n 's@^https\?://www\.youtube\.com/watch?v=@@p' | sed 's/#.*$//')
-
-if ! file=$(find $musicDir -maxdepth 1 | grep -q "[-]$id\\.ogg\$"); then
- echo $uri
-fi
diff --git a/bin/checkMissingLink b/bin/checkMissingLink
deleted file mode 100755
index 4b53f79..0000000
--- a/bin/checkMissingLink
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/sh
-
-file=$1
-id=$(echo "$file" | sed 's/.*\(.\{11\}\)\.ogg/\1/')
-
-if [ $id = '' ]; then
- echo 'no id'
- exit 23
-fi
-
-if ! grep -q -- "$id#" links; then
- echo $file
-fi
diff --git a/bin/checkMissingmp3 b/bin/checkMissingmp3
deleted file mode 100755
index d7722d2..0000000
--- a/bin/checkMissingmp3
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-
-uri=$1
-musicDir=${musicDir-./}
-id=$(echo "$uri" | sed -n 's@^https\?://www\.youtube\.com/watch?v=@@p' | sed 's/#.*$//')
-
-if ! file=$(find $musicDir | grep -q "[-]$id\\.mp3\$"); then
- echo $uri
-fi
diff --git a/bin/ogg-maker b/bin/ogg-maker
deleted file mode 100755
index a812f09..0000000
--- a/bin/ogg-maker
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/sh
-filename="$1"
-outname=$(echo $1 | sed 's/^\(.*\)\..*/\1/').ogg
-if [ "$filename" == "$outname" ]; then
- ffmpeg -i $filename tmp_$outname
- sox --norm tmp_$outname tmp2_$outname silence 1 0.1 1% reverse silence 1 0.1 1% reverse rate 44100
- rm tmp_$outname
- vorbisgain tmp2_$outname
- mv tmp2_$outname $outname
-else
- ffmpeg -i $filename tmp_$outname
- sox --norm tmp_$outname $outname silence 1 0.1 1% reverse silence 1 0.1 1% reverse rate 44100
- rm tmp_$outname
- vorbisgain $outname
- rm $filename
-fi
diff --git a/bin/ogg2mp3 b/bin/ogg2mp3
deleted file mode 100755
index 1fbf414..0000000
--- a/bin/ogg2mp3
+++ /dev/null
@@ -1,15 +0,0 @@
-#! /bin/sh
-set -euf
-target_folder=${target-./}
-
-source=$1
-target_mp3=$(basename $1 | sed 's/ogg$/mp3/')
-
-mkdir -p $target_folder
-
-if test -e $target_folder/$target_mp3; then
- echo "already done: $target_mp3 in $target_folder" >&2
- exit
-fi
-
-ffmpeg -i $source $target_folder/$target_mp3
diff --git a/bin/yout2mp3 b/bin/yout2mp3
deleted file mode 100755
index 72ea234..0000000
--- a/bin/yout2mp3
+++ /dev/null
@@ -1,24 +0,0 @@
-#! /bin/sh
-set -euf
-target_folder=${target-./}
-
-uri=$1
-id=$(echo "$uri" | sed -n 's@^https\?://www\.youtube\.com/watch?v=@@p' | sed 's/#.*$//')
-script=$(readlink -f "$0")
-basedir=$(dirname $script)
-
-mkdir -p $target_folder
-
-if ! echo "$id" | grep -q .; then
- echo "bad uri: $uri" >&2
- exit 23
-fi
-
-cd $target_folder
-
-if file=$(ls | grep "[-]$id\\.mp3\$"); then
- echo "already done: $file in $target_folder" >&2
- exit
-fi
-
-youtube-dl -i -o "%(title)s-%(id)s.%(ext)s" --restrict-filenames -x "$uri" --add-metadata --audio-format mp3
diff --git a/bin/yout2ogg b/bin/yout2ogg
deleted file mode 100755
index b316099..0000000
--- a/bin/yout2ogg
+++ /dev/null
@@ -1,24 +0,0 @@
-#! /bin/sh
-set -euf
-target_folder=${target-./}
-
-uri=$1
-id=$(echo "$uri" | sed -n 's@^https\?://www\.youtube\.com/watch?v=@@p' | sed 's/#.*$//')
-script=$(readlink -f "$0")
-basedir=$(dirname $script)
-
-mkdir -p $target_folder
-
-if ! echo "$id" | grep -q .; then
- echo "bad uri: $uri" >&2
- exit 23
-fi
-
-cd $target_folder
-
-if file=$(ls | grep "[-]$id\\.ogg\$"); then
- echo "already done: $file in $target_folder" >&2
- exit
-fi
-
-youtube-dl -i -o "%(title)s-%(id)s.%(ext)s" --restrict-filenames -x "$uri" --add-metadata --exec "$basedir/ogg-maker {}"
diff --git a/bin/youtplaylist b/bin/youtplaylist
deleted file mode 100755
index c2468a0..0000000
--- a/bin/youtplaylist
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-youtube-dl -i -o "http://www.youtube.com/watch?v=%(id)s#%(title)s" --restrict-filenames --get-filename $1