v2.0.0
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.
93bc711Usedecompress-zipto unpack zipfiles containing digital releases, and useflac-parserto read the metadata out of the extracted audio files. Addnpmlogfor those sweet progress bars. (@othiym23)b15ef86Replacedecompress-zipwithyauzlfor because the latter is a streaming reader, which among other things works better with progress bars. (@othiym23)a17ddbcUse the metadata read from the extracted audio files to assemble tracks into releases. (@othiym23)a24022dAdd heuristics to discriminate between single-artist, 2-artist split, and compilation releases. (@othiym23)fbaa13aFind cover pictures and attach them to their related albums. (@othiym23)c84ee66Clarify where the release was extracted to in the report. (@othiym23)f9506f6Update the docs forpackard unpackand the new options. When--archive-rootand--archiveare 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.
f825fb9Usercto setpackardconfiguration from~/.packardrc. Also introduceuntildifyto handle~/pathsin quoted config (and on Windows command lines). (@othiym23)dbb2bd1Useinito save the configuration parameters passed to the current command when--save-configis included. Configuration can be round-tripped between~/.packardrcand the command line. (@othiym23)
why not use standard?
refactoring
a13bda2packard unpack: Extract unpacking into its own function (for the command), and extract zipfile extraction and FLAC metadata reading into their own modules. (@othiym23)b19b85fpackard unpack: Extract the track to album mapping function (makeAlbums) into the FLAC module. (@othiym23)bab54c4packard unpack: Pull zipfile extraction out intosrc/metadata.index.js. (@othiym23)