File verification script
Kristian Vaaf
vaaf at broadpark.no
Sat Feb 11 06:13:51 PST 2006
Hello!
I need a simple script that uses CFV to report on broken MP3 albums.
All my MP3 albums contain an .sfv file that list MP3 tracks with
their CRC values.
I just need something simple like:
(vaaf at arba)(16:23:02/10/06)
(%:~) verify
curtis_mayfield-superfly_ost-1972: Corrupt
miles_davis-four_and_more-reissue-2005: Corrupt
sun_ra_and_his_outer_space_arkestra-nuclear_war-2002: Corrupt
How would that look like?
The reason I'd prefer something as simple as this, is because most SFV
validation tools are so bloated with useless features.
Anyway ...
I have different SFV script though. It uses CFV to go into all MP3
albums containing
an information file (.nfo) and then generating an SFV of the MP3
tracks, giving it
the same name as the .nfo. For those who are curious, it looks like this:
#!/usr/local/bin/bash
#
# Generate SFV and M3U based on NFO.
# $ARBA: seal.sh,v 1.0 2007/11/11 15:09:05 vaaf Exp $
#
# Requires CFV.
#
for file in `find -s $(pwd) -name \*.nfo`; do
directory="`dirname ${file}`"
prefix="`basename ${file} | sed 's/.nfo//g'`"
current="`basename ${directory}`"
sfv="${directory}/${prefix}.sfv"
m3u="${directory}/${prefix}.m3u"
cd ${directory}
rm -f *.sfv; rm -f *.m3u
touch ${sfv}; cfv -Cq *.mp3
cat ${current}.sfv | awk '! /^;/' > ${sfv}
rm -f ${current}.sfv
for mp3 in *.mp3; do echo "${mp3}" >> ${m3u}; done
echo "$current: Done"
done
Take care people!
Vaaf
More information about the freebsd-questions
mailing list