parsed CDDB entries.
* Added SHOWCDDBFIELDS to define wether to show the YEAR and GENRE fields from
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"
* Added the possibility of using a singletrack flac file with an embeded
cuesheet as a source to extract tracks from.
* Added replaygain for Ogg/Vorbis and Ogg/FLAC.
Changes in 2.3:
* Support for mkcue, to create a CUE sheet of the CD structure. It can be used
- with "-1" to create a backup, so that later on the original CD can be
- recreated.
+ with "-1" to create a backup, so that later the original CD can be recreated.
* New -o <output(1)>:<options(1)>,... way of passing specific options to an
output. Now we can pass specific options without having to modify a config
file. This feature was already present in the last versions of the 2.2 cycle.
TODO:
----
-* flac with force.
-
* Get the multiple choices in both local and remote CDDB to use the same
functions.
* Add musicbrainz support: http://www.rupamsunyata.org/~decklin/musicbrainz-get-tracks
-* flacdecode (to extract files from a -1 flac file) (ALMOST READY!)
-
* read the TOC and CDTEXT files and store them
* read_and_encode_and_tag? :)
invoked once per wav.
Abcde should halt when a problem occurs, so it can be manually resolved.
-
-* AAC support (faac should be free?)
-
fi
}
+# diffentries <filename> <max_value> <entry1>,<entry2>
+diffentries ()
+{
+ FILENAME=$1
+ shift
+ local CDDBDIFFCHOICES=$1
+ shift
+ local CDDBDIFFCHOICE="$@"
+ if [ ! X"$DIFF" = "X" ]; then
+ PARSECHOICE1=$(echo $CDDBDIFFCHOICE | cut -d"," -f1 | xargs printf %d 2>/dev/null)
+ PARSECHOICE2=$(echo $CDDBDIFFCHOICE | cut -d"," -f2 | xargs printf %d 2>/dev/null)
+ if [ $PARSECHOICE1 -lt 1 ] || [ $PARSECHOICE1 -gt $CDDBDIFFCHOICES ] || \
+ [ $PARSECHOICE2 -lt 1 ] || [ $PARSECHOICE2 -gt $CDDBDIFFCHOICES ] || \
+ [ $PARSECHOICE1 -eq $PARSECHOICE2 ]; then
+ echo "Invalid diff range. Please select two coma-separated numbers between 1 and $CDDBDIFFCHOICES" >&2
+ else
+ # We parse the 2 choices to diff, store them in temporary files and diff them.
+ for PARSECHOICE in $(echo $CDDBDIFFCHOICE | tr , \ ); do
+ do_cddbparse "$ABCDETEMPDIR/$FILENAME.$PARSECHOICE" > "$ABCDETEMPDIR/$FILENAME.parsechoice.$PARSECHOICE"
+ done
+ echo "Showing diff between choices $PARSECHOICE1 and $PARSECHOICE2..." > "$ABCDETEMPDIR/$FILENAME.diff"
+ $DIFF $DIFFOPTS "$ABCDETEMPDIR/$FILENAME.parsechoice.$PARSECHOICE1" "$ABCDETEMPDIR/$FILENAME.parsechoice.$PARSECHOICE2" >> "$ABCDETEMPDIR/$FILENAME.diff"
+ if [ $(cat "$ABCDETEMPDIR/$FILENAME.diff" | wc -l) -ge 24 ]; then
+ page "$ABCDETEMPDIR/$FILENAME.diff"
+ else
+ cat "$ABCDETEMPDIR/$FILENAME.diff" >&2
+ fi
+ fi
+ else
+ echo "The diff program was not found in your path. Please choose a number between 0 and $CDDBDIFFCHOICES." >&2
+ fi
+}
+
# do_getcddbinfo
# Finds an specific field from cddbinfo
do_getcddbinfo()
echo ""
} >> "$ABCDETEMPDIR/cddblocalchoices"
done
+ if [ $(cat "$ABCDETEMPDIR/cddblocalchoices" | wc -l) -ge 24 ]; then
+ page "$ABCDETEMPDIR/cddblocalchoices"
+ else
+ # It's all going to fit in one page, cat it
+ cat "$ABCDETEMPDIR/cddblocalchoices" >&2
+ fi
CDDBLOCALCHOICES=$( echo "$CDDBLOCALRESULTS" | wc -l )
- cat "$ABCDETEMPDIR/cddblocalchoices"
+ # Setting the choice to an impossible integer to avoid errors in the numeric comparisons
CDDBLOCALCHOICENUM=-1
if [ "$INTERACTIVE" = "y" ]; then
while [ $CDDBLOCALCHOICENUM -lt 0 ] || [ $CDDBLOCALCHOICENUM -gt $CDDBLOCALCHOICES ]; do
echo -n "Locally cached CDDB entries found. Which one would you like to use (0 for none)? [0-$CDDBLOCALCHOICES]: " >&2
- read CDDBLOCALCHOICENUM
- [ x"$CDDBLOCALCHOICENUM" = "x" ] && CDDBLOCALCHOICENUM="1"
+ read CDDBLOCALCHOICE
+ [ x"$CDDBLOCALCHOICE" = "x" ] && CDDBLOCALCHOICE="1"
+ # FIXME # Introduce diff's
+ if echo $CDDBLOCALCHOICE | egrep -q "[[:space:]]*[[:digit:]]+,[[:digit:]]+[[:space:]]*" ; then
+ diffentries cddblocalread "$CDDBLOCALCHOICES" "$CDDBLOCALCHOICE"
+ elif echo $CDDBLOCALCHOICE | egrep -q "[[:space:]]*[[:digit:]]+[[:space:]]*" ; then
+ # Make sure we get a valid choice
+ CDDBLOCALCHOICENUM=$(echo $CDDBLOCALCHOICE | xargs printf %d 2>/dev/null)
+ if [ $CDDBLOCALCHOICENUM -lt 0 ] || [ $CDDBLOCALCHOICENUM -gt $CDDBLOCALCHOICES ]; then
+ echo "Invalid selection. Please choose a number between 0 and $CDDBLOCALCHOICES." >&2
+ fi
+ fi
done
else
### FIXME ###
.BR abcde
is designed to automate this. It will take an entire CD and convert it into
a compressed audio format - Ogg/Vorbis, MPEG Audio Layer III, Free Lossless
-Audio Codec (FLAC), Ogg/Speex or MPP/MP+(Musepack). With one command, it will:
+Audio Codec (FLAC), Ogg/Speex, MPP/MP+(Musepack) and/or M4A (AAC) format(s).
+With one command, it will:
.TP
.B *
Do a CDDB query over the Internet to look up your CD or use a locally stored CDDB entry
.B \-1
Encode the whole CD in a single file. The resulting file uses the CD title
for tagging. If the resulting format is a flac file with an embeded cuesheet,
-the file can be used as a source for creating other formats.
-.TP
+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
the default TRACK tag for MP3 is $T/$TRACKS so it is changed to simply $T.
.TP
.B \-u
-Set CDDBPROTOCOL to version 6, so that we retrieve UTF-8 encoded CDDB
+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 CDDBURL
Specifies a server to use for CDDB lookups.
.TP
+.B CDDBPROTO
+Specifies the protocol version used for the CDDB retrieval of results. Version
+6 retrieves CDDB entries in UTF-8 format.
+.TP
.B HELLOINFO
Specifies the Hello information to send to the CDDB server. The CDDB
protocol requires you to send a valid username and hostname each time you
user; and "always" which forces the CDDB entry to be stored back in the root of
the CDDBLOCALDIR no matter where it was found, and no matter it was not edited.
This last option will always overwrite the one found in the root of the local
-repository (if any).
+repository (if any). STILL NOT WORKING!!
.TP
.B CDDBCOPYLOCAL
Store local copies of the CDDB entries under the $CDDBLOCALDIR directory.