-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jesus Climent wrote:
> On Fri, Jul 07, 2006 at 02:45:14PM -0500, Charles Steinkuehler wrote:
>> 
>> abcde.leadin.patch is a simple patch to pass cdparanoia the range '0-'
>> instead of '$FIRSTTRACK-$LASTTRACK' when doing a onetrack do_cdread,
>> which causes any lead-in to be ripped along with the audio tracks.
> 
> The problem with this patch is that it breaks the possible option of ripping a
> CD with both a leading track and an end track, which right now is allowed. I
> will have to add a way to check that no track range has been passed in the
> command line and use that as a signaling to rip "0-" in cdparanoia.

Thinking about this some more, I understand what you mean.  While abcde
doesn't currently support specifying tracks in the single-track rip
mode, the do_cdread procedure currently *DOES* allow this.

I'll leave it to you to decide if you always want to rip lead-in info
when in single track mode (and ripping track 1), or have some control
setting to allow for this.

In other news, the main reason I'm writing this mail is because I'm in
the process of doing away with the patch for mkcue.  While I think my
patch was OK, mkcue itself doesn't seem real portable (while cd-discid
looks like it's been ported to most OS flavors).

So instead of hacking mkcue, I've written a small bash script that turns
the output of cd-discid (read from stdin) into a cue file (on stdout).


$ cat discid2cue
#/bin/bash

read DISCID TRACKS OFFSETS

echo FILE \"dummy.wav\" WAVE

set -- $OFFSETS

i=1
while [ $i -le $TRACKS ] ; do
        LBA=$(( $1 - 150 ))
        FRM=$((  $LBA % 75 ))
        SEC=$(( ($LBA / 75) % 60 ))
        MIN=$((  $LBA / 4500 ))
        printf "  TRACK %02i AUDIO\n" $i
        [ $i -eq 1 -a $LBA -ne 0 ] &&
          echo "    INDEX 00 00:00:00"
        printf "    INDEX 01 %02i:%02i:%02i\n" $MIN $SEC $FRM
        i=$(( $i + 1 ))
        shift
done

...and as a bonus, I've fixed the problem with leading spaces getting
swallowed by the do_cleancue routine.  The problem is simply the default
setting of IFS (space, tab, newline)...read looks for anything that is
*NOT* part of IFS.  Setting IFS to just a single newline before the read
causes spaces and tabs to be included in the $line variable, keeping the
pretty cuefile formatting on output:

# diff -u abcde.cuefile abcde.cleancue
- --- abcde.cuefile       2006-07-07 14:13:23.292341184 -0500
+++ abcde.cleancue      2006-07-08 00:43:29.747866652 -0500
@@ -1669,6 +1669,9 @@
                        n=1
                        echo "PERFORMER \"$DARTIST\"" >> "$CUEFILE_OUT"
                        echo "TITLE \"$DALBUM\"" >> "$CUEFILE_OUT"
+                       # Set IFS to <newline> to prevent read from
swallowing spaces and tabs
+                       IFS='
+'
                        cat "$CUEFILE_IN" | while read line
                        do
                                echo "$line" >> "$CUEFILE_OUT"


...still haven't written a bash version of cue2discid.  It's on the
list, but these other issues keep popping up. :-)

- --
Charles Steinkuehler
[EMAIL PROTECTED]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)

iD8DBQFEr0keenk4xp+mH40RAnZ8AKDqykQ7qvBFTZCaoAcR7Y3+uqfkZQCeNXwJ
PG9xDRWMg6op9X8kGTJlFAo=
=kAgB
-----END PGP SIGNATURE-----


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to