Fryguy8
10-22-2002, 10:31 AM
Hi guys, I'm trying to generate a file that follows the following template:
CD_DA
CD_TEXT
{
LANGUAGE_MAP
{
0 : EN
}
LANGUAGE 0
{
TITLE "CD TITLE"
PERFORMER "Performer"
}
}
TRACK AUDIO
CD_TEXT
{
LANGUAGE 0
{
TITLE "Track Title"
PERFORMER "Performer"
}
}
FILE "track1.wav"
TRACK AUDIO
CD_TEXT
{
LANGUAGE 0
{
TITLE "Track Title"
PERFORMER "Performer"
}
}
FILE "track2.wav"
With The TITLE, PERFORMER fields being changed.
Here is the script I've got going so far.
#/bin/sh
echo "CD_DA" &> cd.toc
echo "CD_TEXT{LANGUAGE_MAP{0 : EN}}" &> cd.toc
for I in *.mp3
do
$A=`mp3info -p "%t" $I`
$B=`mp3info -p "%s" $I`
#echo 'TRACK_AUDIO \n CD_TEXT{LANGUAGE 0{ TITLE "$A" \n PERFORMER "$B"}}\n FILE "$I"\n' &> cd.toc
done
I commented out the last echo line because I was having problems with $A and $B, which store the TITLE and PERFORMER Entries. Does anybody have any ideas that will work?
Also, after I get this working, I want to be able to check and see if all the mp3s that are going to be parsed have the same album name, and if they do to write that to the file in another CD_TEXT block (above all the TRACK_AUDIO blocks), and if they don't all match (if it's from a mix CD for instance), to prompt the user (me), for a Title for the CD.
CD_DA
CD_TEXT
{
LANGUAGE_MAP
{
0 : EN
}
LANGUAGE 0
{
TITLE "CD TITLE"
PERFORMER "Performer"
}
}
TRACK AUDIO
CD_TEXT
{
LANGUAGE 0
{
TITLE "Track Title"
PERFORMER "Performer"
}
}
FILE "track1.wav"
TRACK AUDIO
CD_TEXT
{
LANGUAGE 0
{
TITLE "Track Title"
PERFORMER "Performer"
}
}
FILE "track2.wav"
With The TITLE, PERFORMER fields being changed.
Here is the script I've got going so far.
#/bin/sh
echo "CD_DA" &> cd.toc
echo "CD_TEXT{LANGUAGE_MAP{0 : EN}}" &> cd.toc
for I in *.mp3
do
$A=`mp3info -p "%t" $I`
$B=`mp3info -p "%s" $I`
#echo 'TRACK_AUDIO \n CD_TEXT{LANGUAGE 0{ TITLE "$A" \n PERFORMER "$B"}}\n FILE "$I"\n' &> cd.toc
done
I commented out the last echo line because I was having problems with $A and $B, which store the TITLE and PERFORMER Entries. Does anybody have any ideas that will work?
Also, after I get this working, I want to be able to check and see if all the mp3s that are going to be parsed have the same album name, and if they do to write that to the file in another CD_TEXT block (above all the TRACK_AUDIO blocks), and if they don't all match (if it's from a mix CD for instance), to prompt the user (me), for a Title for the CD.