Requirements, source deletion, cosmetic improvements, recovery after crash.

This commit is contained in:
Guillaume Cassonnet 2009-12-18 20:33:36 +01:00
parent 2ee0f56f14
commit b6808dc5d4
2 changed files with 9 additions and 3 deletions

4
README
View file

@ -5,6 +5,10 @@ A simple bash script to split an image file (flac, ape, wav...) and tag the song
* Usage
cuesplitandtag.sh <image-file>
* Requirements
- shntool and the decoders it uses (mac...)
- flac
* Notes
- Output files are in FLAC.
- The script was found on Arch Linux forum (can't find the topic anymore though).

View file

@ -38,7 +38,8 @@ album=`grep -m 1 TITLE *.cue | cut -d\" -f2`
artist=`grep -m 1 PERFORMER *.cue | cut -d\" -f2`
for file in [0-9]*.wav; do
echo "Encoding $file"
echo -n "Encoding [$file] --> "
echo -n "[$file.flac] " | sed -e "s/.wav//"
if [[ ${file:0:1} == 0 ]] ; then
tracknr=${file:1:1}
@ -47,8 +48,9 @@ for file in [0-9]*.wav; do
fi
title=`echo ${file:2} | sed -e "s/.wav$//"`
nice flac -s -T "artist=$artist" -T "album=$album" -T "title=$title" \
-T "tracknumber=$tracknr" "$file" && rm "$file"
nice flac -f -s -T "artist=$artist" -T "album=$album" -T "title=$title" \
-T "tracknumber=$tracknr" "$file" && rm "$file" && echo -n ": OK"
echo
done
echo