annotate gettracks-lame.sh @ 8:2c01c09bdc0f
Handle "artist - title" as well as "artist / title".
Add track number to filename.
If the infile isn't stdin, move it to the mp3 directory.
author |
darius |
date |
Thu, 18 Jul 2002 06:33:52 +0000 |
parents |
5cead4da1db9 |
children |
|
rev |
line source |
2
|
1 #!/bin/sh
|
|
2
|
|
3 if [ $# -lt 1 ]; then
|
|
4 echo Usage: $0 \<tracknum\> [ \<tracknum\> ... ]
|
|
5 exit 1
|
|
6 fi
|
|
7
|
|
8 for t in $* ; do
|
|
9 num=`printf %02d $t`
|
|
10 name=`printf track_%s.mp3 $num`
|
|
11 echo Ripping $num to $name
|
|
12 (cdd -t $num - | sox -t cdr - -t wav - | lame -x -b 192 - $name) 2>> rip.log
|
|
13 if [ $? -ne 0 ]; then
|
|
14 echo "Failed!"
|
|
15 exit 1
|
|
16 fi
|
|
17 done
|
|
18
|