clamz(1)

πŸ’– clamz(1) β€” the manual page, but make it cute πŸ’–

okay so bestie, you're reading the manual page for clamz, section 1 of the General Commands Manual. she's little, she's mighty, she downloads your music. let's get into it πŸŽ€


✨ NAME ✨

clamz β€” download MP3 music files from Amazon.com 🎡


🌸 SYNOPSIS 🌸

clamz [ options ] amz-file ...

πŸ¦‹ DESCRIPTION πŸ¦‹

so clamz is this little command-line program that downloads MP3 files from Amazon.com's music store. she's basically standing in for Amazon's official MP3 Downloader, because that one is not free software β€” which means it only ships as a binary blob for a limited set of platforms. no source, no vibes. πŸ™ˆ

with clamz you can download either individual songs or complete albums that you bought from Amazon. both. she does both. πŸ‘‘

to even use clamz, you have to first enable the ``MP3 dowloader mode'' by visiting this URL:

http://www.amazon.com/gp/dmusic/after_download_manager_install.html?AMDVersion=1.0.9

if you're outside the US, swap amazon.com for whatever the domain is in your country (like amazon.co.uk for the UK, or amazon.fr for France). and heads up β€” Amazon does not allow anyone to purchase MP3 files from outside their country of residence. that's their rule, not mine. 😭

to download the contents of an AMZ file into the current directory, you literally just run:

clamz some-file-name.amz

and the more advanced options? they're all listed right below, bestie. keep scrolling. πŸ’…


πŸŽ€ OPTIONS πŸŽ€

  • -o name-format, --output=name-format β€” sets the name of the downloaded file(s). you can put any of several variables in there, and they get derived from the input AMZ file β€” peep FORMAT VARIABLES below for the full list. also, wrap that format string in single quotes so the shell doesn't go expanding your variables for you. she's nosy like that. πŸ™ˆ
  • -d directory-format, --output-dir=directory-format β€” sets the directory where the downloaded files land. (if that directory doesn't exist yet, it gets created. iconic.) this one can hold format variables too. πŸ“
  • -r, --resume β€” resumes downloading a partially-downloaded album. here's the tea: by default, if you're downloading a file named foo.mp3 and foo.mp3 already exists in the destination directory, clamz renames the new file to foo.mp3.1 so it doesn't overwrite your old one. but with -r, she instead assumes the first part of the file has already been downloaded, and resumes from where it left off. ⏯️
  • -i, --info β€” instead of downloading anything, just prints detailed info about the given AMZ file(s) to standard output. all info, no download. πŸ‘€
  • -x, --xml β€” instead of downloading anything, prints the raw, decrypted XML data from the AMZ file to standard output. the raw tea, unedited. πŸ“œ
  • -v, --verbose β€” shows detailed information while downloading. she's telling you everything. πŸ—£οΈ
  • -q, --quiet β€” turns off the normal progress display; only error messages get shown. shhh. 🀫
  • --forbid-chars=characters β€” don't allow the given characters in output filenames. important: control characters and slashes may never be used in filenames. never ever. 🚫
  • --allow-chars=characters β€” the opposite of the above; removes the given characters from the set of disallowed characters. un-forbidding, if you will. βœ…
  • --allow-uppercase β€” allows uppercase letters in filenames. πŸ” 
  • --forbid-uppercase β€” does not allow uppercase letters in filenames. lowercase only, babe. πŸ”‘
  • --utf8-filenames β€” uses UTF-8 when writing filenames. (the default behavior is to use UTF-8 if the system locale says so, otherwise ASCII.) 🌍
  • --ascii-filenames β€” uses only ASCII characters in filenames. 🌐
  • --help β€” prints out a summary of options. πŸ†˜
  • --version β€” prints out version information. 🏷️

🌈 FORMAT VARIABLES 🌈

as part of a name-format or directory-format option, you can include references to environment variables (like $HOME) or to the xdg-user-dirs configuration variables (like $XDG_MUSIC_DIR or $XDG_DESKTOP_DIR). very much a "use your own setup" moment. πŸ’–

on top of that, the following special variables are defined for each track, based on the info in the AMZ file, and subject to those configuration options above (--forbid-chars, --forbid-uppercase, etc.). so the options can change what you actually get. 🧚

  • ${title}, ${creator}, ${tracknum}, ${discnum}, ${genre}, ${asin} β€” the title, creator, track number, disc number, genre, and ASIN (Amazon Standard Identification Number) of each individual track. 🎧
  • ${album}, ${album_artist}, ${album_asin} β€” the title, primary artist, and ASIN of the album the track comes from. (this info is available both for single-track downloads and full-album downloads. equal opportunity.) πŸ’Ώ
  • ${suffix} β€” the suffix of the output file (currently only mp3.) πŸ“Ž
  • ${amz_title}, ${amz_creator}, ${amz_genre}, ${amz_asin} β€” these variables formerly contained metadata for the AMZ file as a whole; current AMZ files do not contain this information. using these variables is not recommended. they're giving legacy. πŸ’€

similar to shell variable expansion, you can also use these conditional expressions:

  • ${var:-string} β€” expands to the value of the variable var if it's defined and non-empty; otherwise, expands to string (which may itself contain variable references.) πŸͺ„
  • ${var:+string} β€” expands to string if the variable var is defined and non-empty; otherwise, expands to an empty string. 🫧
⚠️ note that when you include format variables in a command-line argument, you'll usually need to enclose the argument in single quotes ('...'), or insert a backslash before the $, to stop the shell from trying to expand the variables itself. protect your variables, bestie. πŸ›‘οΈ

πŸ“ FILES πŸ“

  • $HOME/.clamz/config β€” general configuration file, providing default settings for the --output, --forbid-chars, --allow-uppercase and --utf8-filenames options. the home base. 🏠
  • $HOME/.clamz/amzfiles/ β€” directory containing backup copies of AMZ files. πŸ’Ύ
  • $HOME/.clamz/logs/ β€” directory containing log files. πŸ““

⭐ ENVIRONMENT ⭐

  • http_proxy β€” HTTP proxy to use for downloading files; use server:port to specify a port number. πŸ”Œ

πŸ‘‘ AUTHOR πŸ‘‘

Benjamin Moody <floppusmaximus@users.sf.net>


and that's the whole page, bestie!! you read the entire thing, main character energy fr fr. 🌟

this was Clamz 0.5, from October 2011, and yes she's still serving. mwah. πŸ’…πŸ«Ά

πŸ“¦ where this page comes from