A small shell script to grab audio from a CD and encode/compress it.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

40 lines
1.3 KiB

<?xml version="1.0" encoding="ISO-8859-15"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" indent="no" encoding="ISO-8859-15" />
<xsl:template match="/">
cddb=`echo <xsl:value-of select="/cdinfo/cddb"/> | sed &apos;s/0x\(.*\)/\1/g&apos;`
date=`date`
<xsl:apply-templates select="/cdinfo/track"/>
</xsl:template>
<xsl:template match="track">
track=&quot;`echo <xsl:value-of select="track-number"/> | /usr/bin/awk &apos;{printf(&quot;%02d&quot;, $0)}&apos;`&quot;
track=&quot;${track}-<xsl:value-of select="track-title"/>&quot;
cat &gt; &quot;${track}.xinf&quot; &lt;&lt;- end
#
# X-CD-Roast 0.98alpha15 - INF-File
# created: $date
# by: getcd.sh
#
file = &quot;./${track}.wav&quot;
track = <xsl:value-of select="track-number"/> of <xsl:value-of select="/cdinfo/cd-tracks"/>
title = &quot;<xsl:value-of select="track-title"/>&quot;
artist = &quot;<xsl:value-of select="track-artist"/>&quot;
size = <xsl:value-of select="track-length"/>
type = 1
rec_type = 0
preemp = 0
copyperm = 0
stereo = 1
# from CD:
cd_title = &quot;<xsl:value-of select="/cdinfo/cd-title"/>&quot;
cd_artist = &quot;<xsl:value-of select="/cdinfo/cd-artist"/>&quot;
cd_discid = &quot;$cddb&quot;
end
</xsl:template>
</xsl:stylesheet>