Update 2024-02-14 07:51 OpenBSD/amd64-x13
This commit is contained in:
36
.bin/OLD/bpm-rename
Executable file
36
.bin/OLD/bpm-rename
Executable file
@@ -0,0 +1,36 @@
|
||||
#!/bin/sh -x
|
||||
|
||||
# rename files so the filename includes the BPM
|
||||
|
||||
usage() {
|
||||
printf "Usage: $0 <srcfolder> <dstfolder>\n"
|
||||
exit 2
|
||||
}
|
||||
|
||||
test -z "$1" && usage
|
||||
test -z "$2" && usage
|
||||
|
||||
_src="$(readlink -f "$1")"
|
||||
_dst="$(readlink -f "$2")"
|
||||
|
||||
myread() {
|
||||
read p
|
||||
}
|
||||
|
||||
find "$_src" -type f \
|
||||
| while read _file
|
||||
do
|
||||
printf 'Playing file %s...\n' "$(basename "$_file")"
|
||||
mpv --really-quiet --no-video "$_file" &
|
||||
_pid="$!"
|
||||
|
||||
|
||||
bpm-tag -m $(($v - 20)) -x $(($v + 20)) -n -f "$_file"
|
||||
|
||||
case $d in
|
||||
"[yY]") echo rename; ;;
|
||||
*) ;;
|
||||
esac
|
||||
|
||||
kill $_pid
|
||||
done
|
||||
Reference in New Issue
Block a user