File: simadb_cli.1

package info (click to toggle)
mpd-sima 0.10.0-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 688 kB
  • ctags: 342
  • sloc: python: 2,696; xml: 924; sh: 329; makefile: 86
file content (392 lines) | stat: -rw-r--r-- 13,761 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
'\" t
.\"     Title: simadb_cli
.\"    Author: Jack Kaliko <efrim@azylum.org>
.\" Generator: DocBook XSL-NS Stylesheets v1.76.1 <http://docbook.sf.net/>
.\"      Date: 09/26/2012
.\"    Manual: mpd-sima User Manual
.\"    Source: mpd-sima
.\"  Language: English
.\"
.TH "SIMADB_CLI" "1" "09/26/2012" "mpd-sima" "mpd-sima User Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
simadb_cli \- simadb_cli is a command line interface editor for the sima user DB\&.
.SH "SYNOPSIS"
.HP \w'\fBsimadb_cli\fR\ 'u
\fBsimadb_cli\fR \fB\-\-add_similarity=\fR\fIsimilarity_string\fR [\fB\-\-check_names\fR] [\fB\-\-dbfile=\fR\fIdb_file\fR] [\fB\-\-reciprocal\fR] [\fB\-\-host=\fR\fImpd_host\fR] [\fB\-\-port=\fR\fImpd_port\fR]
.HP \w'\fBsimadb_cli\fR\ 'u
\fBsimadb_cli\fR \fB\-\-remove_artist=\fR\fIartist\fR [\fB\-\-dbfile=\fR\fIdb_file\fR] [\fB\-\-reciprocal\fR]
.HP \w'\fBsimadb_cli\fR\ 'u
\fBsimadb_cli\fR \fB\-\-remove_similarity=\fR\fI"main\ artist,similar\ artist"\fR [\fB\-\-dbfile=\fR\fIdb_file\fR] [\fB\-\-reciprocal\fR]
.HP \w'\fBsimadb_cli\fR\ 'u
\fBsimadb_cli\fR \fB\-\-purge_hist\fR [\fB\-\-dbfile=\fR\fIdb_file\fR]
.HP \w'\fBsimadb_cli\fR\ 'u
\fBsimadb_cli\fR \fB\-\-view_artist=\fR\fB\fI"artist\ name"\fR\fR [\fB\-\-dbfile=\fR\fIdb_file\fR]
.HP \w'\fBsimadb_cli\fR\ 'u
\fBsimadb_cli\fR \fB\-\-view_all\fR [\fB\-\-dbfile=\fR\fIdb_file\fR]
.HP \w'\fBsimadb_cli\fR\ 'u
\fBsimadb_cli\fR {\fB\-\-bl_curr_trk\fR | \fB\-\-bl_curr_art\fR | \fB\-\-bl_curr_alb\fR | \fB\-\-bl_art=\fR\fIartist_name\fR} [\fB\-\-dbfile=\fR\fIdb_file\fR] [\fB\-\-host=\fR\fImpd_host\fR] [\fB\-\-port=\fR\fImpd_port\fR]
.HP \w'\fBsimadb_cli\fR\ 'u
\fBsimadb_cli\fR \fB\-\-remove_bl=\fR\fIrow_id\fR [\fB\-\-dbfile=\fR\fIdb_file\fR]
.HP \w'\fBsimadb_cli\fR\ 'u
\fBsimadb_cli\fR \fB\-\-view_bl\fR [\fB\-\-dbfile=\fR\fIdb_file\fR]
.HP \w'\fBsimadb_cli\fR\ 'u
\fBsimadb_cli\fR {{\fB\-h\fR\ |\ \fB\-\-help\fR} | \fB\-\-version\fR}
.SH "DESCRIPTION"
.PP
This manual page documents briefly the
\fBsimadb_cli\fR
commands\&.
.PP
simadb_cli is a command line interface to get and edit users similarities and blacklist database used with MPD_sima\&. The default database file (see
the section called \(lqFILES\(rq) can be overridden if you want\&.
.PP
Consider reading
the section called \(lqA WORD ABOUT SIMA DATA BASE\(rq
to understand the structure and relation of similarities within the database\&.
.SH "EXAMPLE"
.SS "Similarity edition"
.PP
Here follows some simple examples on how to deal with similarity database\&.
.PP
Pay attention, the following examples set one\-way similarities in the DB! Read more about it in
the section called \(lqA WORD ABOUT SIMA DATA BASE\(rq\&.
.PP
\fIAdding a similarity between two artists\&.\fR
In the following example "Pelican" will point to "Russian Circles" with a match score of 88% (ie\&. "Russian Circles" 88% similar to Pelican, not reciprocal), it will also check against MPD the presence of both artists in the music library\&.
.PP
\fBsimadb_cli \-\-add "Pelican,Russian Circles:80" \-\-check_names\fR
.PP
Similarity string use comma "," as artists separator and semi colon ":" for artist/similarity score separator, cf\&.
the section called \(lqSIMILARITY FORMAT\(rq\&.
.PP
\fIAdding a similarity between multiple artists\&.\fR
In the following example "Rage Against The Machine" will point to "Tool" and "Audioslave" as similar artists and controls artists names are actually in MPD music library\&.
.PP
\fBsimadb_cli \-\-add "Rage Against The Machine,Tool:70,Audiosalve:80" \-\-check_names\fR
.PP
\fIViewing similarit(y|ies) for an artist\&.\fR
In the following example we are looking for entries for "Rage Against The Machine"
.PP
\fBsimadb_cli \-\-view_artist "Rage Against The Machine"\fR
.SS "Black list edition"
.PP
\fIAdding to black list\&.\fR
You can add a single track, an album or an artist to the black list\&. The element to black list is chosen from the currently playing track\&. Use
\fB\-\-bl_curr_trk\fR
to prevent simadb_cli to queue this track,
\fB\-\-bl_curr_alb\fR
or
\fB\-\-bl_curr_art\fR
respectively for the album and the artist\&.
.PP
Remember you need access to your MPD server to retrieve information to black list\&. Defaults are localhost:6600 or found in environment variables but you may set it up from command line:
.PP
\fBsimadb_cli \-\-bl_curr_art \-S mympd\&.example\&.org\fR
.PP

\fITo black list a specific artist\fR
(not currently playing) you can use
\fB\-\-bl_ar="Artist name to black list"\fR\&.
.SH "OPTIONS"
.PP
The program follows the usual GNU command line syntax, with long options starting with two dashes ("\-")\&. A summary of options is included below\&.
.PP
\fB\-h\fR, \fB\-\-help\fR
.RS 4
Print help and exit\&.
.RE
.PP
\fB\-\-version\fR
.RS 4
Print version and exit\&.
.RE
.PP
\fB\-a \fR\fB\fIsimilarity_string\fR\fR, \fB\-\-add_similarity=\fR\fB\fIsimilarity_string\fR\fR
.RS 4
Add similarity to the database\&.
.br
For more details about the
\fIsimilarity_string\fR
see
the section called \(lqSIMILARITY FORMAT\(rq\&.
.RE
.PP
\fB\-c\fR, \fB\-\-check_names\fR
.RS 4
Use with
\fB\-\-add_similarity\fR
in order to check artists names used in
\fIsimilarity_string\fR\&. simadb_cli will control presence of artists names in MPD library\&. Default is to look for MPD server on localhost:6600 or environment variables
\fBMPD_HOST\fR
and
\fBMPD_PORT\fR
if set\&.
.br
You can as well give simadb_cli host/port on the command line using respectively
\fB\-S\fR
and
\fB\-P\fR\&.
.RE
.PP
\fB\-\-bl_art=\fR\fB\fIartist_name\fR\fR
.RS 4
Use to black list
\fIartist_name\fR\&. simadb_cli is checking
\fIartist_name\fR
is actually in MPD music library (cf
\fB\-S\fR
and
\fB\-P\fR
options to set MPD host/address if necessary)\&.
.sp
If
\fIartist_name\fR
is not found the script print out a list of matching artists\&.
.RE
.PP
\fB\-\-bl_curr_trk\fR | \fB\-\-bl_curr_art\fR | \fB\-\-bl_curr_alb\fR
.RS 4
Use to black list the currently playing track|artist|album\&. You need access to your MPD server, use
\fB\-S\fR
and
\fB\-P\fR
to set MPD host/address if necessary\&.
.RE
.PP
\fB\-d \fR\fB\fIdb_file\fR\fR, \fB\-\-dbfile=\fR\fB\fIdb_file\fR\fR
.RS 4
Use the specific file
\fIdb_file\fR
as database\&.
.br
Default is too use
\fBXDG_DATA_HOME\fR
(see
the section called \(lqFILES\(rq)\&.
.RE
.PP
\fB\-\-purge_hist\fR
.RS 4
Purge history, you may supply an alternative DB file with \-\-dbfile option\&.
.RE
.PP
\fB\-r\fR, \fB\-\-reciprocal\fR
.RS 4
Use with an editing options in order to edit reciprocal similarity as well\&.
\fB\-\-add_similarity\fR
and
\fB\-\-remove_{artist|similarity}\fR
are supporting reciprocal edition\&.
.sp
\fIN\&.B\fR: this option has to appear after the editing option on the command line\&.
.sp
See
the section called \(lqA WORD ABOUT SIMA DATA BASE\(rq
for further information about reciprocity notion\&.
.RE
.PP
\fB\-\-remove_artist=\fR\fB\fIartist\fR\fR
.RS 4
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
\fB\-\-reciprocal\fR
option\&.
.RE
.PP
\fB\-\-remove_bl=\fR\fB\fIrow_id\fR\fR
.RS 4
Use to remove a black list entry\&. To get the row_id to suppress use
\fB\-\-view_bl\fR
option\&.
.RE
.PP
\fB\-\-remove_similarity=\fR\fB\fI"main artist,similar artist"\fR\fR
.RS 4
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\&.
.br
Use of
\fB\-\-reciprocal\fR
is possible here, see
the section called \(lqA WORD ABOUT SIMA DATA BASE\(rq\&.
.sp
This option is useful in case you want to remove only a specific similarity between two artists, to remove completely an artist use
\fB\-\-remove_artist\fR
instead\&.
.RE
.PP
\fB\-v \fR\fB\fI"artist name"\fR\fR, \fB\-\-view_artist=\fR\fB\fI"artist name"\fR\fR
.RS 4
Get entries for
\fI"artist name"\fR
in the data base (print to stdout)\&.
.RE
.PP
\fB\-\-view_bl\fR
.RS 4
Get all entries in the black list\&.
.RE
.PP
\fB\-\-view_all\fR
.RS 4
Get all entries in the data base (print to stdout)\&.
.RE
.PP
\fB\-P \fR\fB\fImpd_port\fR\fR, \fB\-\-port=\fR\fB\fImpd_port\fR\fR
.RS 4
Use the specific port number
\fImpd_port\fR
on MPD server\&. This overrides
\fBMPD_PORT\fR
environment variable\&.
.br
Default is
\fI6600\fR\&.
.RE
.PP
\fB\-S \fR\fB\fImpd_host\fR\fR, \fB\-\-host=\fR\fB\fImpd_host\fR\fR
.RS 4
Use the specific host
\fImpd_host\fR
as MPD server\&.
.br
\fImpd_host\fR
can be an
IP
or a fully qualified domain name as long as your system can resolve it\&. This overrides
\fBMPD_HOST\fR
environment variable\&.
.br
Default is
\fIlocalhost\fR\&.
.RE
.SH "FILES"
.PP
${XDG_DATA_HOME}/mpd_sima/sima\&.db
.RS 4
SQLite DB file\&. Usually
\fBXDG_DATA_HOME\fR
is set to
${HOME}/\&.local/share\&.
.RE
.SH "SIMILARITY FORMAT"
.PP
The
\fIsimilarity_string\fR
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
\fImain_art\fR, followed by a list of similar artists which you want to be related to that
\fImain_art\fR, each artist of that list with a specific similarity value, a match score, quantifying the similarity relation with the
\fImain_art\fR\&. The match score value is an integer in [0 ,100] with 100 corresponding to a perfect match\&.
.PP
\fIsimilarity_string\fR
is then to be formatted as follow:
.PP
\fBmain_art,first artist:<score>,second artist:<score>\fR
.PP
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\&.
.PP
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
\fIsimilarity_string\fR
will be the following:
.PP
\fBLed Zeppelin,Tool:25,Audiosalve:20\fR
.PP
See
the section called \(lqA WORD ABOUT SIMA DATA BASE\(rq
for more details about how similarities are handled
.SH "A WORD ABOUT SIMA DATA BASE"
.PP
The similarity database is defined from the point of view of a
\fImain artist\fR
which is declared related to a list of
\fIsimilar artists\fR\&. That means when you define
\fImain_art\fR
to be similar to
\fIsim_art A\fR
and
\fIsim_art B\fR
the reciprocal won\*(Aqt be true,
\fIsim_art A\fR
and
\fIsim_art B\fR
are not similar to
\fImain_art\fR\&. 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"\&.
.br
The
\fB\-\-reciprocal\fR
option allows one to add reciprocal relation where
\fIsim_art A\fR
and
\fIsim_art B\fR
become respectively the
\fImain_art\fR\&. Using
\fB\-\-reciprocal\fR
you will then edit two more entries in the database\&. To summarize here is what you\*(Aqll end up with in your data base adding similarity with this string
\fBmain_art,sim_art A:34,sim_art B:45\fR\&.
.PP
\fBsimadb_cli \-\-reciprocal \-\-add_similarity=main_art,sim_art A:34,sim_art B:45\fR
.PP
main_art similar to sim_art A:34 and sim_art B:45
.br
sim_art A similar to main_art:34
.br
sim_art B similar to main_art:45
.PP
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)\&.
.SH "BUGS"
.PP
The upstream
BTS
can be found at
\m[blue]\fB\%http://codingteam.net/project/sima/bugs\fR\m[]\&.
.SH "FEEDBACK"
.PP
The maintainer would be more than happy to ear from you, don\*(Aqt hesitate to send feedback on the forge, via the upstream
BTS, the forum or the chat room, all available on the forge at
\m[blue]\fB\%http://codingteam.net/project/sima\fR\m[]\&.
.PP
XMPP
users are welcome to join the dedicated chat room at
\m[blue]\fBsima@conference\&.codingteam\&.net\fR\m[]\&.
.SH "SEE ALSO"
.PP
\fBmpc\fR(1),
\fBmpd\fR(1)
.PP

/usr/share/doc/mpd\-sima/
.SH "AUTHOR"
.PP
\fBJack Kaliko\fR <\&efrim@azylum\&.org\&>
.RS 4
Wrote this man page and is currently leading MPD_sima project\&.
.RE
.SH "COPYRIGHT"
.br
Copyright \(co 2009-2012 Jack Kaliko
.br
.PP
This manual page was written for the Debian system (and may be used by others)\&.
.PP
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 3 published by the Free Software Foundation\&.
.PP
On Debian systems, the complete text of the GNU General Public License can be found in
/usr/share/common\-licenses/GPL\&.
.sp