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
Executable file
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/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