From f7c6d185a79bcd2ed8c54a9f71a3dcb5b7f5bcea Mon Sep 17 00:00:00 2001 From: data Date: Sat, 5 Aug 2006 02:23:25 +0000 Subject: [PATCH] abcde.1, abcde.conf * Added CDDBPROTO option * Added cue as an action * Change -u with -U, since we use CDDBPROTO=6 by default debian/changelog, README * Updated accordingly abcde * Add nice values for replay-gain, reading and pipes cddb-tool.1 * Typo git-svn-id: http://abcde.googlecode.com/svn/trunk@219 a0fa61bc-5347-0410-a1a9-7f54aa4e1825 --- README | 5 +++-- abcde | 58 ++++++++++++++++++++++++++---------------------- abcde.1 | 20 ++++++++--------- abcde.conf | 12 ++++++++-- cddb-tool.1 | 2 +- debian/changelog | 26 ++++++++++++++++------ 6 files changed, 74 insertions(+), 49 deletions(-) diff --git a/README b/README index dec7fd8..f69b2f6 100644 --- a/README +++ b/README @@ -29,7 +29,7 @@ Changes in 2.4: the CDDB output. * Added the possibility of embeding a cuesheet on a singletrack flac file. A single BACKUP flag is most likely needed to use all the needed flags: - "abcde -1 -M -o flac" + "abcde -1 -o flac -a default,cue" * Added the possibility of using a singletrack flac file with an embeded cuesheet as a source to extract tracks from (use -X to specify an external CUE2DISCID implementation; check under examples in the distributed source @@ -39,9 +39,10 @@ Changes in 2.4: * Uses the default found $CDROMREADER instead of forcing cdparanoia when cdda2wav is installed. * BATCH mode has been splitted into two options: BATCHNORM and NOGAP. -* Added -U option for non-UNICODE (UTF-8) tag encoding. +* Added -U option for non-UNICODE (non UTF-8) tag encoding. * Added -z for debug. * Added -f to force the removal of left files. +* CUE support has changed from a flag (-M) to an action (cue). Changes in 2.3: * Support for mkcue, to create a CUE sheet of the CD structure. It can be used diff --git a/abcde b/abcde index aca7ebf..31fe0dd 100755 --- a/abcde +++ b/abcde @@ -46,6 +46,7 @@ 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 " WARNING: Deprecated. Use \"cue\" action" echo "-M Create a CUE file" echo "-o " echo " Output file type(s) (vorbis,mp3,flac,spx,mpc,wav,m4a). Defaults to vorbis" @@ -59,7 +60,6 @@ echo " Show dielfs from the CDDB info (year,genre)" echo "-S <#> Set the CD speed" echo "-t <#> Start the track numbering at a given number" echo "-T <#> Same as -t but modifies tag numbering" -echo "-u Use UNICODE (UTF8) tags and comments" echo "-U Do NOT use UNICODE (UTF8) tags and comments" echo "-v Show version number and exit" echo "-V Be a bit more verbose about what is happening behind the scenes" @@ -527,16 +527,16 @@ do_replaygain() done case "$OUTPUT" in flac) - run_command replaygain-flac $METAFLAC --add-replay-gain "${OUTPUTFILES[@]}" + run_command replaygain-flac nice $ENCNICE $METAFLAC --add-replay-gain "${OUTPUTFILES[@]}" ;; vorbis|ogg) - run_command replaygain-vorbis $VORBISGAIN --album "${OUTPUTFILES[@]}" + run_command replaygain-vorbis nice $ENCNICE $VORBISGAIN --album "${OUTPUTFILES[@]}" ;; mp3) - run_command replaygain-mp3 $MP3GAIN -a "${OUTPUTFILES[@]}" + run_command replaygain-mp3 nice $ENCNICE $MP3GAIN -a "${OUTPUTFILES[@]}" ;; mpc) - run_command replaygain-mpc $MPPGAIN --auto "${OUTPUTFILES[@]}" + run_command replaygain-mpc nice $ENCNICE $MPPGAIN --auto "${OUTPUTFILES[@]}" ;; *);; esac @@ -787,7 +787,7 @@ do_tag () eyed3) # FIXME # track numbers in mp3 come with 1/10, so we cannot # happily substitute them with $TRACKNUM - run_command tagtrack-$OUTPUT-$1 $TAGGER $TAGGEROPTS \ + run_command tagtrack-$OUTPUT-$1 nice $ENCNICE $TAGGER $TAGGEROPTS \ --comment=::"$COMMENTOUTPUT" -A "$DALBUM" \ -a "$TRACKARTIST" -t "$TRACKNAME" -Y "$CDYEAR" \ -G "$GENREID" -n "${TRACKNUM:-$1}" "${TRACKNUM:+-N $TRACKS}" \ @@ -796,7 +796,7 @@ do_tag () ;; # FIXME # Still not activated... id3ed) - run_command tagtrack-$OUTPUT-$1 $TAGGER $TAGGEROPTS -c "$COMMENTOUTPUT" \ + run_command tagtrack-$OUTPUT-$1 nice $ENCNICE $TAGGER $TAGGEROPTS -c "$COMMENTOUTPUT" \ -a "$DALBUM" -n "$TRACKARTIST" -s "$TRACKNAME" -y "$CDYEAR" \ -g "$GENREID" -k "${TRACKNUM:-$1}" \ "$ABCDETEMPDIR/track$1.$OUTPUT" @@ -804,7 +804,7 @@ do_tag () *) # FIXME # track numbers in mp3 come with 1/10, so we cannot # happily substitute them with $TRACKNUM - run_command tagtrack-$OUTPUT-$1 $TAGGER $TAGGEROPTS -c "$COMMENTOUTPUT" \ + run_command tagtrack-$OUTPUT-$1 nice $ENCNICE $TAGGER $TAGGEROPTS -c "$COMMENTOUTPUT" \ -A "$DALBUM" -a "$TRACKARTIST" -t "$TRACKNAME" -y "$CDYEAR" \ -g "$GENREID" -T "${TRACKNUM:-$1/$TRACKS}" \ "$ABCDETEMPDIR/track$1.$OUTPUT" @@ -837,7 +837,7 @@ do_tag () *) echo COMMENT="$COMMENTOUTPUT";; esac fi - ) | run_command tagtrack-$OUTPUT-$1 $VORBISCOMMENT $VORBISCOMMENTOPTS -w \ + ) | run_command tagtrack-$OUTPUT-$1 nice $ENCNICE $VORBISCOMMENT $VORBISCOMMENTOPTS -w \ "$ABCDETEMPDIR/track$1.uncommented.$OGGOUTPUTCONTAINER" "$ABCDETEMPDIR/track$1.$OGGOUTPUTCONTAINER" # Doublecheck that the commented file was created successfully before wiping the original if [ -f "$ABCDETEMPDIR/track$1.$OGGOUTPUTCONTAINER" ]; then @@ -867,7 +867,7 @@ do_tag () *) echo COMMENT="$COMMENTOUTPUT";; esac fi - ) | run_command tagtrack-$OUTPUT-$1 $METAFLAC $METAFLACOPTS ${IMPORTCUESHEET:+--import-cuesheet-from="$ABCDETEMPDIR/$CUEFILE"} --import-tags-from=- "$ABCDETEMPDIR/track$1.$FLACOUTPUTCONTAINER" + ) | run_command tagtrack-$OUTPUT-$1 nice $ENCNICE $METAFLAC $METAFLACOPTS ${IMPORTCUESHEET:+--import-cuesheet-from="$ABCDETEMPDIR/$CUEFILE"} --import-tags-from=- "$ABCDETEMPDIR/track$1.$FLACOUTPUTCONTAINER" ;; spx) run_command tagtrack-$OUTPUT-$1 true @@ -1008,20 +1008,26 @@ do_encode () RUN_COMMAND="" # We need a way to store the creation of the files when using PIPES RUN_COMMAND_PIPES="run_command encodetrack-$OUTPUT-$1 true" + # When pipping it does not make sense to have a higher nice for + # reading than for encoding, since it will be hold by the + # encoding process. Setting an effective nice, to calm down a + # bit the reading process. + EFFECTIVE_NICE=$READNICE else run_command '' echo "Encoding track $1 of $TRACKS: $TRACKNAME..." RUN_COMMAND="run_command encodetrack-$OUTPUT-$1" + EFFECTIVE_NICE=$ENCNICE fi case "$OUTPUT" in mp3) case "$2" in %local*%) case "$MP3ENCODERSYNTAX" in - lame|toolame|gogo) $RUN_COMMAND nice $ENCNICE $MP3ENCODER $MP3ENCODEROPTS "$IN" "$OUT" ;; - bladeenc) $RUN_COMMAND nice $ENCNICE $MP3ENCODER $MP3ENCODEROPTS -quit "$IN" ;; - l3enc|xingmp3enc) $RUN_COMMAND nice $ENCNICE $MP3ENCODER "$IN" "$OUT" $MP3ENCODEROPTS ;; + lame|toolame|gogo) $RUN_COMMAND nice $EFFECTIVE_NICE $MP3ENCODER $MP3ENCODEROPTS "$IN" "$OUT" ;; + bladeenc) $RUN_COMMAND nice $EFFECTIVE_NICE $MP3ENCODER $MP3ENCODEROPTS -quit "$IN" ;; + l3enc|xingmp3enc) $RUN_COMMAND nice $EFFECTIVE_NICE $MP3ENCODER "$IN" "$OUT" $MP3ENCODEROPTS ;; # FIXME # Relates to the previous FIXME since it might need the "-if" removed. - mp3enc) $RUN_COMMAND nice $ENCNICE $MP3ENCODER -if "$IN" -of "$OUT" $MP3ENCODEROPTS ;; + mp3enc) $RUN_COMMAND nice $EFFECTIVE_NICE $MP3ENCODER -if "$IN" -of "$OUT" $MP3ENCODEROPTS ;; esac ;; *) @@ -1033,8 +1039,8 @@ do_encode () case "$2" in %local*%) case "$OGGENCODERSYNTAX" in - vorbize) $RUN_COMMAND nice $ENCNICE $OGGENCODER $OGGENCODEROPTS -w "$OUT" "$IN" ;; - oggenc) $RUN_COMMAND nice $ENCNICE $OGGENCODER $OGGENCODEROPTS -o "$OUT" "$IN" ;; + vorbize) $RUN_COMMAND nice $EFFECTIVE_NICE $OGGENCODER $OGGENCODEROPTS -w "$OUT" "$IN" ;; + oggenc) $RUN_COMMAND nice $EFFECTIVE_NICE $OGGENCODER $OGGENCODEROPTS -o "$OUT" "$IN" ;; esac ;; *) @@ -1046,7 +1052,7 @@ do_encode () case "$2" in %local*%) case "$FLACENCODERSYNTAX" in - flac) $RUN_COMMAND nice $ENCNICE $FLACENCODER -f $FLACENCODEROPTS -o "$OUT" "$IN" ;; + flac) $RUN_COMMAND nice $EFFECTIVE_NICE $FLACENCODER -f $FLACENCODEROPTS -o "$OUT" "$IN" ;; esac ;; *) @@ -1066,9 +1072,9 @@ do_encode () fi # Quick hack to avoid tagging Ogg/Speex, since there is no other way to tag than inline tagging if [ ! "$DOTAG" = "y" ]; then - $RUN_COMMAND nice $ENCNICE $SPEEXENCODER $SPEEXENCODEROPTS --author "$TRACKARTIST" --title "$TRACKNAME" "$COMMENT" "$IN" "$OUT" + $RUN_COMMAND nice $EFFECTIVE_NICE $SPEEXENCODER $SPEEXENCODEROPTS --author "$TRACKARTIST" --title "$TRACKNAME" "$COMMENT" "$IN" "$OUT" else - $RUN_COMMAND nice $ENCNICE $SPEEXENCODER $SPEEXENCODEROPTS "$IN" "$OUT" + $RUN_COMMAND nice $EFFECTIVE_NICE $SPEEXENCODER $SPEEXENCODEROPTS "$IN" "$OUT" fi ;; mpc) @@ -1078,12 +1084,12 @@ do_encode () # errors, so I have not tried it myself. ## FIXME ## Needs some cleanup to determine if an empty tag sent ## FIXME ## to the encoder ends up empty. - $RUN_COMMAND nice $ENCNICE $MPPENCODER $MPPENCODEROPTS --artist "$TRACKARTIST" --album "$DALBUM" --title "$TRACKNAME" --track "$1" --genre "$CDGENRE" --year "$CDYEAR" --comment "$COMMENT" "$IN" "$OUT" + $RUN_COMMAND nice $EFFECTIVE_NICE $MPPENCODER $MPPENCODEROPTS --artist "$TRACKARTIST" --album "$DALBUM" --title "$TRACKNAME" --track "$1" --genre "$CDGENRE" --year "$CDYEAR" --comment "$COMMENT" "$IN" "$OUT" ;; m4a) # Quick hack to avoid tagging Ogg/Speex, since there is no other way to tag than inline tagging if [ ! "$DOTAG" = "y" ]; then - $RUN_COMMAND nice $ENCNICE $AACENCODER $AACENCODEROPTS --artist "$TRACKARTIST" --album "$DALBUM" --title "$TRACKNAME" --track "$1" --genre "$CDGENRE" --year "$CDYEAR" --comment "$COMMENT" -o "$OUT" "$IN" + $RUN_COMMAND nice $EFFECTIVE_NICE $AACENCODER $AACENCODEROPTS --artist "$TRACKARTIST" --album "$DALBUM" --title "$TRACKNAME" --track "$1" --genre "$CDGENRE" --year "$CDYEAR" --comment "$COMMENT" -o "$OUT" "$IN" else $RUN_COMMAND nice $ENCNICE $AACENCODER $AACENCODEROPTS -o "$OUT" "$IN" @@ -1881,7 +1887,7 @@ do_discid () # Store the abcde version in the status file. echo "abcde-version=$VERSION" >> "$ABCDETEMPDIR/status" fi - if [ X"$MAKECUEFILE" = "Xy" -a X"$WEHAVEACD" = "Xy" ]; then + if [ X"$DOCUE" = "Xy" -a X"$WEHAVEACD" = "Xy" ]; then if checkstatus cuefile > /dev/null 2>&1 ; then :; else CUEFILE=cue-$(echo "$TRACKINFO" | cut -f1 -d' ').txt vecho "Creating cue file..." @@ -3102,7 +3108,7 @@ while getopts 1a:bBc:C:d:Defghj:klLmMnNo:pPr:s:S:t:T:uvVxX:w:W:z opt ; do n) CDDBAVAIL=n ;; N) INTERACTIVE=n ;; m) DOSPLAYLIST=y ;; - M) MAKECUEFILE=y ;; + M) DOCUE=y ;; o) OUTPUTTYPE="$OPTARG" ;; p) PADTRACKS=y ;; P) USEPIPES=y ;; @@ -3242,7 +3248,7 @@ for ACTION in $(echo $ACTIONS | tr , \ ) do case $ACTION in default) DOCDDB=y; DOREAD=y; DOENCODE=y; DOTAG=y; DOMOVE=y; DOCLEAN=y;; - cue) DOCUE=y;; + cue) DOCUE=y ; MAKECUEFILE=y ;; cddb) DOCDDB=y;; read) DOREAD=y;; normalize) DONORMALIZE=y; DOREAD=y;; @@ -3437,7 +3443,7 @@ do [ "$FLACENCODERSYNTAX" = "default" ] && FLACENCODERSYNTAX=flac [ "$DOTAG" = "y" ] && NEEDMETAFLAC=y [ "$DOREPLAYGAIN" = "y" ] && NEEDMETAFLAC=y - [ "$ONETRACK" = "y" ] && [ "$MAKECUEFILE" = "y" ] && NEEDMETAFLAC=y + [ "$ONETRACK" = "y" ] && [ "$DOCUE" = "y" ] && NEEDMETAFLAC=y ;; spx) [ "$SPEEXENCODERSYNTAX" = "default" ] && SPEEXENCODERSYNTAX=speexenc @@ -3605,7 +3611,7 @@ if [ ! "$CDDBAVAIL" = "n" ] && [ "$DOCDDB" = "y" ]; then : fi fi -if [ "$MAKECUEFILE" = "y" ]; then +if [ "$DOCUE" = "y" ]; then NEEDCUEREADER=y fi diff --git a/abcde.1 b/abcde.1 index a43810c..657eea0 100644 --- a/abcde.1 +++ b/abcde.1 @@ -56,12 +56,12 @@ the file can be used as a source for creating other formats. Use "-1 -M -o flac" for obtaining such a file. .TP .B \-a [actions] -Comma-delimited list of actions to perform. Can be one or more of: -cddb, read, normalize, encode, tag, move, replaygain, playlist, clean. Normalize -and encode imply read. Tag implies cddb, read, encode. Move implies -cddb, read, encode, tag. Replaygain implies cddb, read, encode, tag and move. -Playlist implies cddb. The default is to do all actions except normalize, -replaygain and playlist. +Comma-delimited list of actions to perform. Can be one or more of: cddb, cue, +read, normalize, encode, tag, move, replaygain, playlist, clean. Normalize and +encode imply read. Tag implies cddb, read, encode. Move implies cddb, read, +encode, tag. Replaygain implies cddb, read, encode, tag and move. Playlist +implies cddb. The default is to do all actions except normalize, replaygain and +playlist. .TP .B \-b Enable batch mode normalization. See the BATCHNORM configuration variable. @@ -178,11 +178,9 @@ filenames and the playlist. Internal (tag) numbering remains the same. Same as \-t but changes also the internal (tag) numbering. Keep in mind that the default TRACK tag for MP3 is $T/$TRACKS so it is changed to simply $T. .TP -.B \-u -Set CDDBPROTO to version 6, so that we retrieve UTF-8 encoded CDDB -information, and we tag and add comments with a proper encoding. This flag will -be removed and -U will be added to set it to version 5 once version 6 becomes -the default. +.B \-U +Set CDDBPROTO to version 5, so that we retrieve ISO-8859-15 encoded CDDB +information, and we tag and add comments with Latin1 encoding. .TP .B \-v Show the version and exit diff --git a/abcde.conf b/abcde.conf index cb75990..163d85c 100644 --- a/abcde.conf +++ b/abcde.conf @@ -11,6 +11,10 @@ # environment variable - wget will use it correctly. #CDDBURL="http://freedb.freedb.org/~cddb/cddb.cgi" +# The CDDB protocol level. +# Right now 5 is latin1 output and 6 is UTF8 encoding. +#CDDBPROTO=6 + # The CDDB protocol requires hello information, including a valid username # and hostname. If you feel paranoid about giving away such info, edit this # line - the format is username@hostname. @@ -194,13 +198,17 @@ # Actions to take # Comma-separated list of one or more of the following: -# cddb,read,normalize,encode,tag,move,playlist,clean +# cddb,cue,read,normalize,encode,tag,move,playlist,clean,default # encode implies read # normalize implies read # tag implies cddb,read,encode # move implies cddb,read,encode,tag # playlist implies cddb -# The default action list is defined in the following comment. +# An action can be added to the "default" action by specifying it along with +# "default", without having to repeat the default ones: +# ACTIONS=default,playlist +# The default action list (referenced as "default") is defined in the following +# comment: #ACTIONS=cddb,read,encode,tag,move,clean # CD device you want to read from diff --git a/cddb-tool.1 b/cddb-tool.1 index 3154905..8ebd6ec 100644 --- a/cddb-tool.1 +++ b/cddb-tool.1 @@ -58,7 +58,7 @@ parse file and dumps to stdout in a form sourceable by the shell Mails file file (or stdin of no file specified) to specified address, using correct format. Category should -be one of blues, classical, country, data, fold, jazz, newage, +be one of blues, classical, country, data, folk, jazz, newage, reggae, rock, soundtrack, misc. .B template diff --git a/debian/changelog b/debian/changelog index a7b76d0..9bd4acc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ abcde (2.3.99.6-1) unstable; urgency=low - * Default to UNICODE (UTF8) tags and comments. + * Default to UNICODE (UTF8) tags and comments (Closes: #282332). + - Added CDDBPROTO option in config file (Closes: #349951) * Added a missing "INDEX 01" entry for CUE sheet creation. * Avoid completing the encoding of files if we aborted previously. * Embed the CUE sheet if we have a cuesheet file and we have a single FLAC @@ -12,22 +13,33 @@ abcde (2.3.99.6-1) unstable; urgency=low * Updated config file with some new AAC bits. * Updated FSF address. * Corrected NetBSD options for ftp (Thanks to Marius). - * Added an internal implementation of cue2discid, so there is no need for an - external program to do the conversion. Thanks to Michael (sorry, his mail - does not have a surname). * The final 2.4 will have "cuefile" as an action instead of as a flag. * Create the cuefile when extracting from a FLAC file. * Small bugs (Charles Steinkuehler): - - Added missing quotes + - Added missing quotes (Closes: #375710) - toolame is included in Debian as default MP3 encoder - Use IFS to preserve spaces when adding metadata to a cuefile * Small documentation changes: - abcde.1 (Closes: #364978) + * The dollowing entries have in commong that both add an internal cue2discid + function. I will evaluate which one is more accurate and decide which one + to use. Right now they are not conflicting. * Added internal mkcue and cue2discid functions (Charles Steinkuehler) and add a check for internal abcde. to make sure we are using the correct version (not sure if needed ;) - - -- Jesus Climent Sat, 5 Aug 2006 03:06:32 +0300 + * Added an internal implementation of cue2discid, so there is no need for an + external program to do the conversion. Thanks to Michael (sorry, his mail + does not have a surname). + * cue2discid is now an internal function, so no need for including the + python script in the path (Closes: #378407) + * cddb-tool.1 typo (Thanks to A. Costa) (Closes: #351775) + * abcde.1 typo (Thanks to David L. Anselmi) (Closes: #364978) + * Set proper nice values to not separate encoding and reading in the pipes + situation, while having a high priority process running in the system. + Also, set proper nice values to tagging tasks. Reading should remain as + the default higher priority task in the abcde flow (Closes: #359156) + + -- Jesus Climent Sat, 5 Aug 2006 03:33:36 +0300 abcde (2.3.99.5-1) unstable; urgency=low -- 2.20.1