📅 You're Invited: Meet the Socket team at RSAC (April 28 – May 1).RSVP
Socket
Sign inDemoInstall
Socket

id3-to-directories

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

id3-to-directories

A CLI tool to organize a directory tree of unsorted (but ID3 tagged) MP3 files into an "Artist Name/Album Name/Song Title.ext" structure under a top-level directory specified by an environment variable.

0.0.2
latest
Source
npm
Version published
Weekly downloads
6
500%
Maintainers
1
Weekly downloads
 
Created
Source

id3-to-directories

A command-line tool to organize a directory of unsorted (but ID3 tagged) music files into "Artist Name/Album Name/Song Title.ext" sub-directory structure under a location specified by an environment variable.

We operate with the assumption that most users are going to have a primary "music directory" on their computer. For instance on linux environments, this will often be $HOME/Music. We use this assumption to make the operation of this tool as simple as possible where you have to supply a single argument, the source directory which contains unsorted (but ID3 tagged) files.

I wrote this package over a few minutes while playing with the excellent node-id3 package and as such this tool addresses a limited use-case. But this being a GPLV3 package, feel free to submit PRs or fork the repo to support your own use case.

Installation

npm i -g id3-to-directories

Usage

Set an environment variable

In your .bashrc (or equivalent) export the variable MUSIC_STORAGE_DIRECTORY. For instance,

export MUSIC_STORAGE_DIRECTORY=/home/adamsmith/Music

Invoke the command

id3-to-directories /home/adamsmith/Downloads

This will cause all the mp3 files present in /home/adamsmith/Downloads (and sub-directories) to be moved into corresponding /home/adamsmith/Music/<artist name>/<album name>/<song title>.<extension> directories.

Credits

The real magic of reading ID3 tags is performed by the node-id3 package. I only wrote some very simple FS walking logic which uses the said package.

Keywords

CLI

FAQs

Package last updated on 30 Jun 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts