simadb_cli — simadb_cli is a command line interface editor for the sima user DB.
simadb_cli
{ -a
similarity_string
| --add_similarity=
similarity_string
} [
{ -c
| --check_names
}
] [
{ -d
db_file
| --dbfile=
db_file
}
] [
{ -r
| --reciprocal
}
] [
{ -S
mpd_host
| --hostname
mpd_host
}
] [
{ -P
mpd_port
| --port
mpd_port
}
]
simadb_cli
--remove_artist=
artist
[
{ -d
db_file
| --dbfile=
db_file
}
] [
{ -r
| --reciprocal
}
]
simadb_cli
--remove_similarity=
"main artist,similar artist"
[
{ -d
db_file
| --dbfile=
db_file
}
] [
{ -r
| --reciprocal
}
]
simadb_cli
{ -v
| "artist name"
--view_artist=
} [
{ "artist name"
-d
db_file
| --dbfile=
db_file
}
]
simadb_cli
--view_all
simadb_cli
{
{ -h
| --help
}
| --version
}
This manual page documents briefly the simadb_cli commands.
simadb_cli is a command line interface to get and edit users similarities database used with MPD_sima. The default database file (see the section called “FILES”) can be overridden if you want.
Consider reading the section called “A WORD ABOUT SIMA DATA BASE” to understand the structure and relation of similarities within the database.
The program follows the usual GNU command line syntax, with long options starting with two dashes ("-"). A summary of options is included below.
-h
, --help
Print help and exit.
--version
Print version and exit.
-a similarity_string
, --add_similarity=similarity_string
Add similarity to the database.
For more details about the similarity_string
see the section called “SIMILARITY FORMAT”.
-c
, --check_names
Use with --add_similarity
in order to check artists names used in similarity_string
. simadb_cli will control presence of artists names in MPD library.
-d db_file
, --dbfile=db_file
Use the specific file db_file
as database.
Default is too use XDG_DATA_HOME
(see the section called “FILES”).
-r
, --reciprocal
Use with an editing options in order to edit reciprocal similarity as well. --add_similarity
and --remove_{artist|similarity}
are supporting reciprocal edition.
N.B: this option has to appear after the editing option on the command line.
See the section called “A WORD ABOUT SIMA DATA BASE” for further information about reciprocity notion.
--remove_artist=artist
Use to remove an artist entry (as main artist) with its associated similarities. To remove artist where it appears as a similar artist use the --reciprocal
option.
--remove_similarity="main artist,similar artist"
Use to remove a single similarity between a main artist and an associated similarity. Give the main artist first, use comma (",") to separate it from similar artist.
Use of --reciprocal
is possible here, see the section called “A WORD ABOUT SIMA DATA BASE”.
This option is useful in case you want to remove only a specific similarity between two artists, to remove completly an artist use --remove_artist
instead.
-v "artist name"
, --view_artist="artist name"
Get entries for "artist name"
in the data base (print to stdout).
--view_all
Get all entries in the data base (print to stdout).
-P mpd_port
, --port=mpd_port
Use the specific port number mpd_port
on MPD server.
Default is 6600.
-S mpd_host
, --hostname=mpd_host
Use the specific host mpd_host
as MPD server.mpd_host
can be an IP or a fully qualified domain name as long as your system can resolve it.
Default is localhost.
${XDG_DATA_HOME}/mpd_sima/sima.db
SQLite DB file. Usually XDG_DATA_HOME
is set to ${HOME}/.local/share
.
The similarity_string
has to be formatted following a special pattern in order for simadb_cli to extract similarity relations between artists names. Usually a similarity entry is defined as a main artist, lets say main_art, followed by a list of similar artists which you want to be related to that main_art, each artist of that list with a specific similarity value, a match score, quantifying the similarity relation with the main_art. The match score value is an integer in [0 ,100] with 100 corresponding to a perfect match.
similarity_string
is then to be formatted as follow:
main_art,first artist:<score>,second artist:<score>
Each artist group are separated with commas (",") and inside each group the artist name and the match score is colon (":") separated. Obviously the first artist group, as the main artist, does not have a match score.
Lets see how it works with an example. I consider "Led Zeppelin" to be similar to "Tool" with a match score of 25, I also want to have "Audioslave" related to "Led Zeppelin" with a score of 20. Then the similarity_string
will be the following:
Led Zeppelin,Tool:25,Audiosalve:20
See the section called “A WORD ABOUT SIMA DATA BASE” for more details about how similarities are handled
The similarity database is defined from the point of view of a main artist which is declared related to a list of similar artists. That means when you define main_art to be similar to sim_art A and sim_art B the reciprocal won't be true, sim_art A and sim_art B are not similar to main_art. At least this is the default behavior when you edit entries with simadb_cli, this is also the way last.fm is working concerning similar artists. This documentation is using that particular terminology to specify which kind of artist we are dealing with : "main artist" or "similar artist".
The --reciprocal
option allows to add reciprocal relation where sim_art A and sim_art B become respectively the main_art. Using --reciprocal
you will then edit two more entries in the database. To summarize here is what you'll end up with in your data base adding similarity with this string main_art,sim_art A:34,sim_art B:45.
simadb_cli --reciprocal --add_similarity=main_art,sim_art A:34,sim_art B:45
main_art similar to sim_art A:34 and sim_art B:45
sim_art A similar to main_art:34
sim_art B similar to main_art:45
Without the reciprocal option you would have add only the first similarity. Usually using the reciprocal option is the desired behavior, at least what users have in mind when thinking of similarity relation between to artists but keep in mind that it may lead to have MPD_sima more sensible to loop over the same two artist (ASSERTION TO BE CONFIRMED).
The maintainer would be more than happy to here from you, don't hesitate to send feedback on the forge, via the upstream BTS, the forum or the chat room, all available on the forge at http://codingteam.net/project/sima.
XMPP users are welcome to join the dedicated room at sima@conference.codingteam.net.