radis

command module
v0.0.2-0...-4727776 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2016 License: GPL-3.0 Imports: 8 Imported by: 0

README

GoDoc Build Status Report Card Coverage Status GPLv3

Radis

What it is

radis is a tool to help organize my music collection. Can it be of any use to you? Unless you like your music organized like I do, probably not. See Usage to see what I mean.

So radis reads configuration files to move albums in the correct genre and artist folders. I could not get beets to organize things as I wanted, so radis is what I use once beets has imported (with correct tags, embedded art, etc) an album.

It does a few things:

  • It helps with artists with more than one alias, so that an album is moved to main alias/alias (year) album title.
  • It also helps sorting artists into the genres I have decided they belong to.
  • If it is sorting them out of an "incoming" folder, it treats the albums as new to your collection and automatically generates daily/monthly MPD playlists of your new music.
  • It can list and update the above-mentionned playlists if the albums have moved since their creation.
  • It can also tell you which albums are mp3s instead of flac.

And it's quite fast too.

DISCLAIMER: radis moves files around, deletes empty directories: You may lose data. Act as if you could lose everything and prepare accordingly.

Why it is

beets can fetch genres from last.fm, but most of the time the results feel wrong to me: too generic or too specific.

With radis, you decide which artist belong to which genre. If you decide Beethoven isn't Death Metal after all, change the configuration file and sync again.

Also, this is an excuse to learn Go.

Table of Contents

Requirements

Radis runs on Linux (tested in Archlinux only). It may run fine elsewhere, who knows.

It is written in Go, so everything fits into a nice executable.

Installation

If you have a working Go environnment, go get it:

$ go get -u github.com/barsanuphe/radis

The configuration files radis_aliases.yaml and radis_genres.yaml are expected to be in $XDG_CONFIG_HOME/radis/. You might want to ln -s your actual configuration files there.

Usage

This command lists what was found in the configuration files:

$ radis config show

This loads, sorts, and save the configuration files, for better readability:

$ radis config save

This reorganizes your music collection in the Root indicated in radis.yaml:

$ radis collection sync

Make sure Root is correct. radis will stop if the path does not exist, but otherwise it will at least delete empty directories in that Root.

Also, radis only works if you have this setup:

root/
|- Genre/
   |- Artist/
      |- Artist (year) Album

What if you have something different? Then you should not use radis.

Before doing a sync, you can also try radis collection check, which will just show what a sync would do.

Of course, you should only have flac versions of your music. Sometimes they do not exist, so these albums have a [MP3] suffix in the folder name.

To list those offending albums, and check you have not missed any:

$ radis collection fsck

To list known playlists:

$ radis playlist show

And to update them after a radis sync that has moved albums around:

$ radis playlist update

When in doubt:

$ radis help
Configuration

radis uses three yaml files to describe

  • useful paths
  • artist aliases
  • artist genre

radis.yaml looks like this:

# where your music is, assumed to be your MPD music_directory
Root:   /path/to/music/collection/
# if albums are found there, they will be added to MPD playlists
IncomingSubdir: INCOMING
# albums without genres are put there
UnsortedSubdir: UNCATEGORIZED
# playlists are created there
MPDPlaylistDirectory: /path/to/mpd/playlists/

radis_aliases.yaml looks like this:

main_alias:
- other alias
- another one

radis_genres.yaml is not surprising either:

genre:
- artist
- another one

Compilations should be in folders such as: Various Artists (1937) Old Stuff. They can be associated to a genre in the yaml file:

genre:
- artist
- Various Artists | compilation title

Remember you can use radis config save to reorder the files for aliases and genres.

Configuration examples

radis_aliases.yaml:

MF DOOM:
- MadVillain
- JJ DOOM
- Viktor Vaughn
Radiohead:
- Thom Yorke
- Jonny Greenwood

radis_genres.yaml is not surprising either:

Underground Hip-Hop:
- MF DOOM
Brit-Rock:
- Radiohead
- Blur
Blues:
- Various Artists | Rare Chicago Blues

Documentation

Overview

Radis is a tool to keep your music collection in great shape.

Prerequisites

Radis works, provided your music collection is organized like this:

root/Genre/Artist/Artist (year) Album

And that the necessary configuration files exist.

What it does

Radis can sort albums according to user-defined genres and user-defined artist aliases.

It can track newly imported albums and adds them automatically to MPD playlists.

These playlists can be updated if the albums move later.

It can list albums not encoded in flac, as they should all be.

More information

See http://github.com/barsanuphe/radis for more information, including how to create the necessary configuration files.

Usage

When in doubt, try:

radis help

which should display something like:

		R A D I S
		---------

NAME:
   R A D I S - Organize your music collection.

USAGE:
   radis [global options] command [command options] [arguments...]

VERSION:
   0.0.1

COMMANDS:
   config, c            options for configuration
   playlist, p          options for playlist
   collection, p        options for music collection
   help, h              Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --help, -h           show help
   --version, -v        print the version

or:

radis collection help

which would give:

		R A D I S
		---------

NAME:
   R A D I S collection - options for music collection

USAGE:
   R A D I S collection [global options] command [command options] [arguments...]

VERSION:
   0.0.1

COMMANDS:
   sync, s              sync folder according to configuration
   check, s             check against configuration
   fsck, findMP3        check every album is a flac version, list the heretics.
   help, h              Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --help, -h   show help

Directories

Path Synopsis
Package config helps manage configuration files for radis.
Package config helps manage configuration files for radis.
Package directory helps deal with folder structure.
Package directory helps deal with folder structure.
Package music deals with album folders and m3u playlists.
Package music deals with album folders and m3u playlists.

Jump to

Keyboard shortcuts

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