Friday, 13 April 2012

Example Sensible Clamz Configuration file

Stick this in your ~/.clamz/config file so that your music gets downloaded to a sensible place with sensible file names. Unfortunately an example config file isn't installed when you install clamz. I had to figure this out from the source code. This might save someone a few minutes of digging around in the future so I've posted it below:

#Sensible Config File for Clamz Amazon MP3 Downloader
#Modified by: http://www.beesnotincluded.com
#Based on options.c from clamz source code

## Clamz configuration file

## Default format for output filenames.  This may contain any of
## the following variables:

##  ${title} ${creator} ${album} ${tracknum} ${album_artist}
##  ${genre} ${discnum} ${suffix} ${asin} ${album_asin}
##  ${amz_title} ${amz_creator} ${amz_asin} ${amz_genre}

## The name format may also contain slashes, if you'd like to
## categorize your files in subdirectories.
NameFormat       "${tracknum} - ${title}.${suffix}"
DirectoryFormat "${album_artist}/${album}/"


## Set to True to allow uppercase in filenames.
## False to convert to lowercase.
AllowUppercase   True

## Set to True to output UTF-8 filenames, False to output ASCII only,\n"
## UseLocale to check the system locale setting.
## Note: Using anything other than ASCII seems to be prone to falling over
## whenever the track name/artist has a hint of french
AllowUTF8        False

## The set of ASCII characters which are disallowed.  (Control
## characters and slashes are always disallowed.)
ForbidChars      "\"!\\\"$*:;<>?\\\\`|~\"

In the future, when you call clamz:
% clamz /tmp/Amazon0123456.amz
You're music will land in the current directory with the directory and file structure specified in the config file.

2 comments:

Anonymous said...

thanks for the tip !

Note that starting with clamz 0.15 the DirectoryFormat variable is no longer read from the config file.

Just use something like

NameFormat "${album_artist}/${album}/${tracknum} - ${title}.${suffix}"

instead

Chris said...

Hey,

Thanks for the advice,

Chris