bookemdano;659057 Wrote:
> Sorry to bump a (somewhat) old thread but I was wondering if anyone had
> any ideas on how to do the reverse of this.
>
> So, anyone have any ideas on how to automate it somehow? Seems like a
> script that looks at track 1 (or the first FLAC file in a given
> folder), extracts the artwork from the vorbis tag and names it
> cover.jpg (and/or folder.jpg) would be feasible.
>
> Unfortunately I don't know how to script so just wondering if something
> like this already exists (I'm willing to pay for an app too)--preferably
> on a Mac but I have a Windows box too so either way.
>
> Any ideas would be welcome. Thanks!
CHANGE THE LAST LINE ($HOME/MUSIC/FLAC) TO YOUR STARTING DIRECTORY
Code:
--------------------
#!/bin/bash
count=0
function walk_tree {
# echo "Directory: $1"
local directory="$1"
local i
for i in "$directory"/*;
do
if [ "$i" = . -o "$i" = .. ]; then
continue
elif [ -d "$i" ]; then # Process directory and / or walk-down into
directory
walk_tree "$i" # DO NOT COMMENT OUT THIS LINE!!
else
if [ -e "$i" -a "${i##*.}" = "flac" -o "${i##*.}" = "FLAC" ] ;
then
let count++
echo "$count: Exporting Album Art: ${i#* - }..."
f1="${i##*/}"
f2="${f1% -*}"
/usr/local/bin/metaflac --preserve-modtime
--export-picture-to="$1/Cover.jpg" "$i"
if [ $? -eq 1 ] ; then
echo "ERROR:$i"
exit 1
else
curdir=${i%/*}
if [ "${curdir##*/}" != "Singles" ] ; then
break
fi
fi
fi
fi
done
}
time walk_tree $HOME/Music/FLAC # No trailing slash!
--------------------
--
Tony T
Tony
 SBTouch ♪ SBRadio ♬
------------------------------------------------------------------------
Tony T's Profile: http://forums.slimdevices.com/member.php?userid=34544
View this thread: http://forums.slimdevices.com/showthread.php?t=87845
_______________________________________________
ripping mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/ripping