=============
Changes in 2.7
+* Rewrite of the mungefilename function.
* Support added for downloading album art.
* Support added for ripping with libcdio (cd-paranoia).
* Some error checking and a small help file added to abcde-musicbrainz-tool.
OUTPUT="$TMPOUTPUT"
# Create ALBUMFILE, ARTISTFILE, TRACKFILE
- # Munge filenames as follows:
- # ' ' -> '_'
- # '/' -> '_'
- # ''' -> ''
- # '?' -> ''
- # Eat control characters
ALBUMFILE="$(mungefilename "$DALBUM")"
ARTISTFILE="$(mungefilename "$TRACKARTIST")"
TRACKFILE="$(mungefilename "$TRACKNAME")"
# Custom filename munging:
mungefilename ()
{
- #echo "$@" | sed s,:,\ -,g | tr \ /\* __+ | tr -d \'\"\?\[:cntrl:\]
- echo "$@" | sed s,:,\ -,g | tr \ / __ | tr -d \'\"\?\[:cntrl:\]
+ echo "$@" | sed -e 's/^\.*//' -e 's/ /_/g' | tr -d ":><|*/\"'?[:cntrl:]"
}
# Custom genre munging:
.B mungefilename
mungefilename() is an \fBabcde\fR shell function that can be overridden via
\fIabcde.conf\fR. It takes CDDB data as $1 and outputs the resulting filename on
-stdout. It defaults to eating control characters, apostrophes and
-question marks, translating spaces and forward slashes to underscores, and
-translating colons to an underscore and a hyphen.
+stdout. It defaults to deleting any preceding dots to filename, replacing spaces
+with an underscore and eating characters which variously Windows and Linux do
+not permit.
.br
If you modify this function, it is probably a good idea to keep the forward
slash munging (UNIX cannot store a file with a '/' char in it) as well as
#ALBUMARTALWAYSCONVERT="n"
# Custom filename munging:
-# By default, abcde will do the following to CDDB data to get a useful
-# filename:
-# * Translate colons to a space and a dash for Windows compatibility
-# * Translate spaces and forward slashes to underscores
-# * Eat single quotes, double quotes, question marks and control characters
-# To change that, redefine the mungefilename function.
-# mungefilename receives the CDDB data (artist, track, title, whatever)
-# as $1 and outputs it on stdout.
+# By default, abcde will do the following to CDDB data to get a useful filename:
+# 1. Delete any dots preceding the title (first sed command)
+# 2. Replace all spaces with an underscore (second sed command). Simply remove
+# this if you prefer spaces.
+# 3. Delete a grab bag of characters which variously Windows and Linux do not permit
+# (tr command). Remove any of these from the list if you wish to actually use them.
+#
#mungefilename ()
#{
-# echo "$@" | sed s,:,\ -,g | tr \ / __ | tr -d \'\"\?\[:cntrl:\]
+# echo "$@" | sed -e 's/^\.*//' -e 's/ /_/g' | tr -d ":><|*/\"'?[:cntrl:]"
#}
# Custom genre munging:
abcde 2.7
+ * Rewrite of abcde's mungefilename function. Thanks to
+ Andreas Kusalananda Kahari for this and also thanks
+ to Andrew Willis for the report which triggered the
+ rewrite. This closes Issue 135.
* TRACKTOTAL now written to flac and ogg files. Thanks to
monkth for the notification. This resolves Issue 76.
* Support added for the downloading of album art. A huge