Created
August 31, 2015 10:27
-
-
Save Yanpas/f6c0f873867f4c697d60 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
# Needed apps | |
# mp3val eyed3 id3v2 python-mutagen zsh | |
cd /home/$USER/Загрузки/ | |
rename s/_\\\(zvukoff\.ru\\\)//g *.mp3 | |
rename s/_\\\(zv\.fm\\\)//g *.mp3 | |
rename s/_/\ /g *.mp3 | |
for file in *.mp3 | |
do | |
mp3val -f $file | |
rm -f $file.bak | |
mid3iconv -eCP1251 $file | |
criteria=$(id3v2 --list $file|egrep "zvukoff|zv.fm"|tr "\n" " ") | |
if [[ $criteria != "" ]] | |
#newname=$file | |
then | |
eyeD3 --remove-images --remove-comments --album="" $file | |
#id3v2 -A "" $file | |
#newname=$(echo $file|sed -e 's/ [a-z]/\U&/g'|sed -e 's/^[a-z]/\U&/g') | |
fi | |
newname=$(echo $file|sed -e 's/ [a-z]/\U&/g'|sed -e 's/^[a-z]/\U&/g') | |
mv $file ../Музыка/$newname | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment