aboutsummaryrefslogtreecommitdiff
path: root/scripts/music/tag-bulk.sh
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2020-12-24 00:06:27 +0530
committerAkshay Nair <phenax5@gmail.com>2020-12-24 00:06:27 +0530
commit865728068c965e066d0f8971c5b5ba26e12e7dce (patch)
treec16195f0a04cf7d004fe5b396255734f4d60bb00 /scripts/music/tag-bulk.sh
parent649ef5f225039e498358c3d056dfd7fcbc56f014 (diff)
downloadnixos-config-865728068c965e066d0f8971c5b5ba26e12e7dce.tar.gz
nixos-config-865728068c965e066d0f8971c5b5ba26e12e7dce.zip
Adds scripts and links scripts and wallpapers
Diffstat (limited to 'scripts/music/tag-bulk.sh')
-rwxr-xr-xscripts/music/tag-bulk.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/scripts/music/tag-bulk.sh b/scripts/music/tag-bulk.sh
new file mode 100755
index 0000000..bd93205
--- /dev/null
+++ b/scripts/music/tag-bulk.sh
@@ -0,0 +1,26 @@
+#!/usr/bin/env bash
+
+artist=$1;
+album=$2;
+
+ext=${3:-'opus'};
+
+file=${4:-'taginfo'};
+
+total=$(cat $file | wc -l);
+
+cat $file | while read n song; do
+ song_file="$song.$ext";
+ if [[ -f "$song_file" ]]; then
+ ~/scripts/music/tag.sh \
+ -a "$artist" \
+ -A "$album" \
+ -t "$song" \
+ -n "$n" \
+ -N "$total" \
+ "$song_file";
+ else
+ echo "File $song_file not found";
+ fi;
+done;
+