X-Git-Url: https://git.hcoop.net/clinton/abcde.git/blobdiff_plain/b7f1cc84a5f43b84d9814c7394b67b54c9d2fd2c..81bc6204b5e55cb49c86639809d99dc2b77d200e:/abcde diff --git a/abcde b/abcde index 44875bd..9ac7733 100755 --- a/abcde +++ b/abcde @@ -11,45 +11,53 @@ # Copyright for this work is to expire January 1, 2010, after which it # shall be public domain. -VERSION="2.1pre2.2.0" +VERSION="2.2.0" usage () { echo "This is abcde v$VERSION." echo "Usage: abcde [options] [tracks]" echo "Options:" -echo "-1 Encode the whole CD in a single file" -echo "-a Actions to perform (cddb,read,normalize,encode,tag,move,playlist,clean)" -echo "-A Experimental actions (retag, transcode)" -echo "-b Batch mode: enable album normalization and nogap encoding" -echo "-c Specify a configuration file (overrides system and user config files)" -echo "-C Specify discid to resume from (only needed if you no longer have the cd)" -echo "-d Specify CDROM device to grab" -echo "-D Debugging mode (equivalent to sh -x abcde)" -echo "-h This help information" +echo "-1 Encode the whole CD in a single file" +echo "-a " +echo " Actions to perform (cddb,read,normalize,encode,tag,move,playlist,clean)" +echo "-A Experimental actions (retag, transcode)" +echo "-b Batch mode: enable album normalization and nogap encoding" +echo "-c " +echo " Specify a configuration file (overrides system and user config files)" +echo "-C " +echo " Specify discid to resume from (only needed if you no longer have the cd)" +echo "-d " +echo " Specify CDROM device to grab" +echo "-D Debugging mode (equivalent to sh -x abcde)" +echo "-h This help information" #echo "-i Tag files while encoding, when possible (local only) -NWY-" -echo "-j Number of encoder processes to run at once" -echo "-k Keep the wav tracks for later use" -echo "-l Use low disk space algorithm" -echo "-L Use local CDDB storage directory" -echo "-n No lookup. Don't query CDDB, just create and use template" -echo "-N Noninteractive. Never prompt for anything" -echo "-m Modify playlist to include CRLF endings, to comply with some players" -echo "-o Output file type(s) (ogg,mp3,flac,spx,mpc). Defaults to ogg" -echo "-p Pad track numbers with 0's (if less than 10 tracks)" +echo "-j <#> Number of encoder processes to run at once (localhost)" +echo "-k Keep the wav tracks for later use" +echo "-l Use low disk space algorithm" +echo "-L Use local CDDB storage directory" +echo "-n No lookup. Don't query CDDB, just create and use template" +echo "-N Noninteractive. Never prompt for anything" +echo "-m Modify playlist to include CRLF endings, to comply with some players" +echo "-o " +echo " Output file type(s) (ogg,mp3,flac,spx,mpc). Defaults to ogg" +echo "-p Pad track numbers with 0's (if less than 10 tracks)" #echo "-P Use UNIX pipes to read+encode without wav files" -echo "-r [host1,host2...] Also encode on these remote hosts" -echo "-R Add replaygain values to the tag info (only for ogg,flac)" -echo "-s Start the track numbering at a given number [DEPRECATED: use -t]" -echo "-S Set the CD speed" +echo "-r " +echo " Also encode on these remote hosts" +echo "-R Add replaygain values to the tag info (only for ogg,flac)" +echo "-S <#> Set the CD speed" #echo "-t File types to preprocess (wav)" #echo "-T Set postprocessing options" -echo "-t Start the track numbering at a given number" -echo "-T Start the track numbering at a given number, modifying tag numbering" -echo "-v Show version number and exit" -echo "-V Be a bit more verbose about what is happening behind the scenes" -echo "-x Eject CD after all tracks are read" -echo "-w [comment] Add a comment to the CD tracks" +echo "-t <#> Start the track numbering at a given number" +echo "-T <#> Same as -t but modifies tag numbering" +echo "-v Show version number and exit" +echo "-V Be a bit more verbose about what is happening behind the scenes" +echo "-x Eject CD after all tracks are read" +echo "-w " +echo " Add a comment to the CD tracks" +echo "-W <#> Contatenate CDs: -T #01 -w \"CD #\"" +echo "" echo "Tracks is a space-delimited list of tracks to grab." echo "Ranges specified with hyphens are allowed." } @@ -412,7 +420,7 @@ do_encode () for OUTPUT in $(echo $OUTPUTTYPE | tr , \ ) do OUT="$ABCDETEMPDIR/track$1.$OUTPUT" - echo "Encoding track $1 of $TRACKS: $TRACKNAME..." >&2 + run_command '' echo "Encoding track $1 of $TRACKS: $TRACKNAME..." case "$OUTPUT" in mp3) case "$2" in @@ -1258,6 +1266,7 @@ do_cddbedit () # I'll take CDDB read #3 for $400, Alex echo -n "Which entry would you like abcde to use (0 for none)? [0-$CDDBCHOICES]: " >&2 read CDDBCHOICE + [ X"$CDDBCHOICE" = "X" ] && CDDBCHOICE=1 # Make sure we get a valid choice CDCHOICENUM=$(echo $CDDBCHOICE | xargs printf %d 2>/dev/null) while [ $CDCHOICENUM -lt 0 ] || [ $CDCHOICENUM -gt $CDDBCHOICES ]; do @@ -1661,9 +1670,11 @@ pre_read () : } +############################################################################### # End of functions # # Start of execution +############################################################################### # Builtin defaults CDDBURL="http://freedb.freedb.org/~cddb/cddb.cgi" @@ -1853,7 +1864,7 @@ fi # Parse command line options #while getopts 1a:bc:C:d:Dhj:klLnNo:pr:S:t:T:vVx opt ; do -while getopts 1a:A:bc:C:d:Dhj:klLnNo:pr:Rs:S:t:T:vVxw: opt ; do +while getopts 1a:A:bc:C:d:Dhj:klLnNo:pr:Rs:S:t:T:vVxw:W: opt ; do case "$opt" in 1) ONETRACK=y ;; a) ACTIONS="$OPTARG" ;; @@ -1894,6 +1905,7 @@ while getopts 1a:A:bc:C:d:Dhj:klLnNo:pr:Rs:S:t:T:vVxw: opt ; do V) EXTRAVERBOSE="y" ;; x) EJECTCD="y" ;; w) COMMENT="$OPTARG" ;; + W) STARTTRACKNUMBER="${OPTARG}01" ; STARTTRACKNUMBERTAG="y" ; COMMENT="CD${OPTARG}" ;; ?) usage; exit ;; esac done