Script for fetching random accent

This commit is contained in:
2021-05-27 13:24:28 +01:00
parent 10513f60f4
commit 166af2cb21
2 changed files with 19 additions and 0 deletions

12
addbrackets.sh Executable file
View File

@@ -0,0 +1,12 @@
#! /bin/bash
files="$(find ~/Tower/Resources/strippedAccents -iregex '.*(.*' -not -iregex '.*).*')"
IFS=$'\n'
for file in $files
do
new_name="$(echo "$file" | sed 's/.mp3/).mp3/')"
echo "Moving to $new_name"
mv "$file" "$new_name"
done

7
randomaccent.sh Executable file
View File

@@ -0,0 +1,7 @@
# !/bin/bash
file="$(find ~/Tower/Resources/strippedAccents -name '*.mp3' | shuf | head -1)"
echo "$(basename "$file" .mp3)"
mpv "$file"