mixxx-folders2crates

command module
v0.2.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2022 License: MIT Imports: 15 Imported by: 0

README

mixxx-folders2crates

GitHub Workflow Status GitHub go.mod Go version Go Reference

This is the repository for a tool I developed to help keep my crates up to date with my music library. My library consists of loads of songs that I manually sorted into a bunch of folders per genre and subgenre of that music, e.g. something like:

├── House
│   ├── 90s
│   │   ├── Funky
│   │   │   ├── Fatboy Slim & Riva Starr - Eat, Sleep, Rave, Repeat.mp3
│   │   │   ├── Felix - Don't U Want Me.flac
│   │   │   ├── Mr. Matey - Acid Party (Aciieed Groove Mix).flac
│   │   │   ├── ...
│   │   │   └── Xpansions - Move Your Body (Elevation) [Club Mix].mp3
│   │   └── Mr Oizo - Flat Beat.mp3
│   ├── Acid
│   │   ├── Acid Arab - Le Gaz Qui Fait Rire.mp3
│   │   └── Harder
│   │       ├── Hot Hanas Hula - 70th & King Drive.flac
│   │       ├── Hot Hanas Hula - Hot Hands.flac
│   │       ├── Jack Frost & The Circle Jerks - Acid Rout.flac
│   │       └── Mix Machine - Bikini.flac
│   ├── Bangers
│   │   ├── BICEP - VISION OF LOVE.mp3
│   │   ├── David Harness - Al Greenz (Dance) (Original Mix).mp3
│   │   ├── Disclosure - Ecstasy.mp3
│   │   ├── DMX Krew - Come to Me.flac
...

My problem is that I want to import these songs into Mixxx crates based on this folder structure.

Doing this manually requires opening Mixxx, then:

  • for every one of those (sub-)folders in my library:
    • navigate to this folder
    • create a crate for the folder if it doesn't already exist, e.g. House - 90s - Acid
    • select every song in it and right click -> Add to crate -> select the crate for this folder -> tick the checkbox.

That's quite some manual effort which compounds greatly when adding a few songs to my library every now and then, or moving songs around within my library (making them incorrectly be shown in the crate while they no longer exist).

So I decided to spend my manual effort into building this tool to automate the process. It's written in Go and takes about 1 second to update all 46 crates and 832 tracks in my music library in Mixxx's SQLite DB file.

This tool is tested and used by me on Linux (x86 and ARM), but you may also be able to get it working on Windows or MacOS. I included the default Mixxx DB file paths for Linux, Windows and MacOS, so if you can get it to compile it on your machine, this tool should theoretically work. Please let me know if it actually does :)

Usage

With the latest version of Go (1.17 or higher) installed, run this command to build and install mixxx-folders2crates:

go install github.com/bvobart/mixxx-folders2crates@latest

Then run it with:

mixxx-folders2crates FOLDER

replacing FOLDER with the location of your music library.

Note: this tool depends on go-sqlite3 which is a CGO_ENABLED=1 package and thus requires a C compiler to be installed for it to compile.

.crateignore

Place a .crateignore file at the root of your music library folder to specify files and folders that mixxx-folders2crates should ignore. This file uses the same syntax as a .gitignore file (thanks to go-gitignore).

For example:

.stfolder
Phone
# this is just a comment
MixxxRecordings
Beatport Top 100*
Development

To help develop this tool, git clone this repo, then open a terminal in this folder and run:

go run . FOLDER
# e.g.
go run . ~/Music

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL