Skip to content

v2.0.0

Choose a tag to compare

@othiym23 othiym23 released this 11 Jan 03:21
· 308 commits to master since this release

packard unpack

I buy almost all of my music online as FLACs now, mostly from the 4 Bs: Boomkat, Beatport, Bleep, and Bandcamp. Most of them distribute purchased releases as FLAC files rolled up into zipfiles: Boomkat and Bandcamp with one zipfile per release, and Bleep with many releases combined into a single archive. (Beatport, despite having a fantastic selection of dance music, only sells lossless audio as (expensive) WAVs that have to be downloaded individually, and they also don't embed any metadata into the files, requiring me to transcode to FLAC and add metadata by hand using XLD, which is probably something packard should handle, although it's out of scope for now.)

Unpacking these files by hand isn't a huge job, but it's got a number of steps, and since I tend to buy a whole bunch of releases at once (and frequently forget one or more of the steps), this is a natural workflow to automate.

  • 93bc711 Use decompress-zip to unpack zipfiles containing digital releases, and use flac-parser to read the metadata out of the extracted audio files. Add npmlog for those sweet progress bars. (@othiym23)
  • b15ef86 Replace decompress-zip with yauzl for because the latter is a streaming reader, which among other things works better with progress bars. (@othiym23)
  • a17ddbc Use the metadata read from the extracted audio files to assemble tracks into releases. (@othiym23)
  • a24022d Add heuristics to discriminate between single-artist, 2-artist split, and compilation releases. (@othiym23)
  • fbaa13a Find cover pictures and attach them to their related albums. (@othiym23)
  • c84ee66 Clarify where the release was extracted to in the report. (@othiym23)
  • f9506f6 Update the docs for packard unpack and the new options. When --archive-root and --archive are set, move zipfiles to the standard home for zipfiles. (@othiym23)

packard gets its own configuration file

I work on the npm CLI for my day job, and one of its most powerful features is its almost overbearingly flexible configuration framework. npm's configuration framework is overcomplicated and hard to master (and makes it hard to do things like add an npm exec because of the way centralizing the configuration handling makes it difficult for npm commands to know whether npm knows whether a configuration parameter is allowed in the current context or not), but it's also very useful. By adding a --save-config command-line argument, and also creating a simple .ini-style configuration file, I'm trying to capture the 80% of that that's useful without hemming myself in too much.

  • f825fb9 Use rc to set packard configuration from ~/.packardrc. Also introduce untildify to handle ~/paths in quoted config (and on Windows command lines). (@othiym23)
  • dbb2bd1 Use ini to save the configuration parameters passed to the current command when --save-config is included. Configuration can be round-tripped between ~/.packardrc and the command line. (@othiym23)

why not use standard?

refactoring

  • a13bda2 packard unpack: Extract unpacking into its own function (for the command), and extract zipfile extraction and FLAC metadata reading into their own modules. (@othiym23)
  • b19b85f packard unpack: Extract the track to album mapping function (makeAlbums) into the FLAC module. (@othiym23)
  • bab54c4 packard unpack: Pull zipfile extraction out into src/metadata.index.js. (@othiym23)

cleanup

  • c298bf0 Track numbers should be two digits with leading zeroes so that lexically sorting the files in an album directory produces the album order for tracks. (@othiym23)
  • 0d185fe Actually run the tests, and fix the typos that identifies. (@othiym23)