ref: fe1ee9869d0fc80d5d9f64a8898f772259a98063 import-album/README.md -rw-r--r-- 1.8 KiB
fe1ee986 — Richard Mavis Rename the executable. 2 years ago


import-album---move or copy files into your media library.


import-album [-c] [-i] [-l DIR] FILE [FILE...]

-c, --copy
    Copy files. The default behavior is to move them. For zip
    files, the unzip directory will still be removed.

-i, --interactive
    Confirm values and actions before each copy/move.

-l, --library
    Use the named DIR as the library directory. The default is


import-album knows how to handle plain files or zip files of plain files. Files will be copied into the library directory according to the names present in the source file.

For plain files, it expects the source to be in the format:

{artist name} - {title}.{extension}

And the destination file will be named:

{library}/{artist name}/{title}/01 {title}.{extension}

Zip files will be unzipped into a temporary directory in the same directory as the zip file. The temporary directory will be removed after the operation. The unzipped file names should be in the format:

{artist name} - {album name} - {title}.{extension}

And the destination file will be named:

{library}/{artist name}/{album name}/{title}.{extension}

The zipped file names will presumably contain numbers, if appropriate.

Files in the temporary directory with a name that doesn't conform to the expected format (like "cover.jpg") will retain that name in the destination directory.


Ruby and a few standard Unix utilities:

  • cut
  • file
  • unzip


  1. Clone the repository: https://git.sr.ht/~rfm/import-album.
  2. Move the executable import-album (or make a symlink to it) somewhere in your $PATH.
  3. Ensure the executable is executable (chmod it 744, etc).
  4. There is no step 3.