This repository has been archived on 2024-04-27. You can view files and clone it, but cannot push or open issues or pull requests.
autoytdlp/id3tag.sh

25 lines
466 B
Bash
Raw Normal View History

2023-02-03 11:06:41 +03:00
#!/usr/bin/env bash
ask () {
read -r -p "[Y/n] " answer
if [[ $answer =~ [NnНн] ]]; then
echo 0
else
echo 1
fi
}
echo "Enter directory where your music is located:"
read -e -r -i "./convert" directory
directory="${directory:-./convert}"
echo
echo "Copy files into ./tagged/artist/album directory?"
copy_arg=$(ask)
echo
find "$directory" -type f -name "*.mp3" -exec \
python3 ./.id3tag_helper.py "$copy_arg" {} \;
rm -f ./input