tags - MusicDB Tag Manager

This module handles the different tags for songs and albums. It can be used to explore the tags-table, add tags, remove tags and tag songs and albums.

There are three types of tags:

genre:

Genre tags are of class "genre" and have no parents. They annotate the main genre to a song or album. For example Classic, Metal, Pop, Hip Hop, … Genre tags for albums are used by MusicDB to show or hide them in the web UI. Further more the randomizer randy only chooses from songs that genres are activated.

subgenre:

Subgenre tags are of class "subgenre" and have a main genre as parent. They are for a more detailed classification. For example the genre Metal can have the subgenres Dark Metal, Folk Metal, Industrial Metal, ….

mood:

Mood tags are a bit more exotic than the other two types. They are of class "mood" and have no parents. A mood tag annotats a mood to a song. For example: Peacefull, Wild, Sad, Funny, …. Mood tags are a dominant feature of MusicDB. They are placed in form of icons into the HUD of the web UI. The position in the mood-tag grid in the HUD as well as the Icon can also be specified. As icon, an unicode character can be used. (Further types like SVG may be added in future if people want it)

Main commands

In the following list, class is a string “genre”, “subgenre” or “mood” depending which class of tag shall be addressed

  • -c class - Create a new tag

  • -m class - Modify an existing tag

  • -d class - Delete an existing tag

  • -l class - List all existing tags of a class

If a specific tag shall be addressed, use the --name tagname argument. In case a subgenre gets created, the --set-parent genre argument is mandatory.

For the list and delete command (-l|-d) all other arguments will be ignored.

For the create-command (-c) only the --set-name and the --set-parent argument will be used.

Style Guide

To handle tags correctly, the following rules shall be kept in mine.

  1. Do not use other Names or Icons than the one from the database

  2. Use the Color only on Icons. Use the secondary color for names, and for icons when no other color is given

  3. For developers: Use an Unicode font that is as complete as possible

  4. For developers: Do not ignore the position give by the database

Example calls

Create a new tags (-c $CLASS)

# create a genre "Metal"
musicdb tags -c genre --set-name Metal

# Create a subgenre of Metal
musicdb tags -c subgenre --set-parent Metal --set-name "Dark Metal"

Modify a tag (-m $CLASS)

# change color of the greedy-mood
musicdb tags -m mood --name Greedy --set-color #08D008 --set-icon \$

# Rename a tag
musicdb tags -m subgenre --name "Deathmetal" --set-name "Death Metal"

Delete a tag (-d $CLASS)

# Delete a main genre (!! THERE IS NO CHECK FOR DEPENDENCIES !!)
musicdb tags -d genre Ambient

List entries (-l $CLASS)

# List all genres
musicdb tags -l genre

Create an initial set of mood tags

LOGFILE="moodlog.ansi"

musicdb tags -c mood --set-name Sing    --set-posx 1 --set-posy 0 --set-icon ♫︎
musicdb tags -c mood --set-name Lucky   --set-posx 2 --set-posy 0 --set-icon ☺︎ --set-color "#00A000"
musicdb tags -c mood --set-name Sad     --set-posx 3 --set-posy 0 --set-icon ☹︎