chiark / gitweb /
The web interface now automaticallty figures out its own URL, so this
[disorder] / doc / disorder.1.in
CommitLineData
460b9539 1.\"
a55c70c7 2.\" Copyright (C) 2004, 2005, 2006, 2007 Richard Kettlewell
460b9539 3.\"
4.\" This program is free software; you can redistribute it and/or modify
5.\" it under the terms of the GNU General Public License as published by
6.\" the Free Software Foundation; either version 2 of the License, or
7.\" (at your option) any later version.
8.\"
9.\" This program is distributed in the hope that it will be useful, but
10.\" WITHOUT ANY WARRANTY; without even the implied warranty of
11.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12.\" General Public License for more details.
13.\"
14.\" You should have received a copy of the GNU General Public License
15.\" along with this program; if not, write to the Free Software
16.\" Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
17.\" USA
18.\"
19.TH disorder 1
20.SH NAME
21disorder \- DisOrder jukebox client
22.SH SYNOPSIS
23.B disorder
24.RI [ OPTIONS ]
25.RB [ -- ]
26.RI [ COMMANDS ...]
460b9539 27.SH DESCRIPTION
460b9539 28.B disorder
29is used to query the \fBdisorderd\fR(8) daemon from the command line.
30It may be used to request tracks, scratch tracks, query the current
31state, etc, and by an administrator to shutdown or reconfigure the
32daemon.
33.PP
34If no commands are specified then \fBdisorder\fR connects to the
35daemon and then immediately disconnects. This can be used to test
36whether the daemon is running. Otherwise, it executes the commands
37specified.
38.SH OPTIONS
39.TP
40.B --config \fIPATH\fR, \fB-c \fIPATH
41Set the configuration file. The default is
42.IR pkgconfdir/config .
43.TP
44.B --debug\fR, \fB-d
45Enable debugging.
46.TP
47.B --help\fR, \fB-h
48Display a usage message.
49.TP
460b9539 50.B --version\fR, \fB-V
51Display version number.
52.TP
53.B --help-commands\fR, \fB-H
54List all known commands.
55.SH COMMANDS
56.TP
0f55e905
RK
57.B adduser \fIUSER PASSWORD\fR [\fIRIGHTS\fR]
58Create a new user. If \fIRIGHTS\fR is not specified then the
59\fBdefault_rights\fR setting from the server's configuration file applies.
60.TP
61.B authorize \fIUSER\fR [\fIRIGHTS\fR]
62Create \fIUSER\fR with a random password. \fIUSER\fR must be a UNIX login
63user (not just any old string). If \fIRIGHTS\fR is not specified then the
64\fBdefault_rights\fR setting from the server's configuration file applies.
e86021e4 65.IP
0f55e905
RK
66An appropriate \fIconfig.USER\fR is created, owned by the user, so they should
67be able to log in immediately.
e86021e4 68.TP
a55c70c7
RK
69.B deluser \fIUSER\fR
70Delete a user.
71.TP
460b9539 72.B dirs \fIDIRECTORY\fR [\fB~\fIREGEXP\fR]
73List all the directories in \fIDIRECTORY\fR.
74.IP
75An optional regexp may be specified, marked with an initial \fB~\fR. Only
76directories with a basename matching the regexp will be returned.
77.TP
78.B disable
0f55e905 79Disable playing after the current track finishes.
460b9539 80.TP
a55c70c7
RK
81.B edituser \fIUSER PROPERTY VALUE
82Set some property of a user.
83.TP
460b9539 84.B enable
85(Re-)enable playing.
86.TP
87.B files \fIDIRECTORY\fR [\fB~\fIREGEXP\fR]
88List all the files in \fIDIRECTORY\fR.
89.IP
90An optional regexp may be specified, marked with an initial \fB~\fR. Only
91files with a basename matching the regexp will be returned.
92.TP
93.B get \fITRACK\fR \fIKEY\fR
94Display the preference \fIKEY\fR for \fITRACK\fR.
95.TP
96.B get-global \fIKEY\fR
97Get a global preference.
98.TP
99.B get-volume
0f55e905 100Display the current volume settings.
460b9539 101.TP
102.B length \fITRACK\fR
0f55e905 103Display the length of \fITRACK\fR in seconds.
460b9539 104.TP
105.B log
0f55e905 106Write event log messages to standard output, until the server is terminated.
460b9539 107See \fBdisorder_protocol\fR (5) for details of the output syntax.
108.TP
109.B move \fITRACK\fR \fIDELTA\fR
110Move
111.I TRACK
112by
113.I DELTA
114within the queue. Positive values move towards the head of the queue, negative
115values towards the tail.
116.IP
117Note that if you specify a negative value then the
118.B --
119option separate (before all commands) becomes mandatory, as otherwise the
120negative value is misinterpreted an an option.
121.TP
122.B part \fITRACK\fR \fICONTEXT\fI \fIPART\fR
123Get a track name part.
124.IP
125\fICONTEXT\fR should be either \fBsort\fR or \fBdisplay\fR. \fBpart\fR is the
126part of the name desired, typically \fBartist\fR, \fBalbum\fR or \fBtitle\fR.
127.TP
128.B pause
129Pause the current track. (Note that not all players support pausing.)
130.TP
131.B play \fITRACKS\fR...
132Add \fITRACKS\fR to the end of the queue.
133.TP
134.B playing
135Report the currently playing track.
136.TP
137.B prefs \fITRACK\fR
138Display all the preferences for \fITRACK\fR.
139.TP
140.B queue
141List the current queue. The first entry in the list is the next track to play.
142.TP
143.B random-disable
144Disable random play.
145.TP
146.B random-enable
147Enable random play.
148.TP
149.B recent
150List recently played tracks. The first entry is the oldest track, the last
151entry is the most recently played one.
152.TP
e86021e4
RK
153.B reconfigure
154Make the daemon reload its configuration file.
155.TP
460b9539 156.B remove \fITRACK\fR
157Remove a track from the queue.
158.TP
e86021e4
RK
159.B rescan
160Rescan the filesystem for new tracks. There is an automatic daily rescan but
161if you've just added some tracks and want them to show up immediately, use this
162command.
163.TP
460b9539 164.B resolve \fITRACK\fR
165Resolve aliases for \fITRACK\fR and print out the real track name.
166.TP
167.B resume
168Resume the current track after a pause.
169.TP
ca831831
RK
170.B rtp-address
171Report the RTP brodcast address used by the server (if any).
172.TP
460b9539 173.B scratch
174Scratch the currently playing track.
175.TP
176.B scratch-id \fIID\fR
177Scratch the currently playing track, provided it has the given ID.
178.TP
179.B search \fITERMS\fR
180Search for tracks containing all of the listed terms. The terms are
181separated by spaces and form a single argument, so must be quoted,
182for example:
183.IP
184.B "disorder search 'bowie china'"
185.IP
186You can limit the search to tracks with a particular tag, too, using the
187\fBtag:\fR modifier. For example:
188.IP
ca831831 189.B "disorder search 'love tag:depressing'"
460b9539 190.TP
191.B set \fITRACK\fR \fIKEY\fR \fIVALUE\fR
192Set the preference \fIKEY\fR for \fITRACK\fR to \fIVALUE\fR.
193.TP
194.B set-global \fIKEY\fR \fIVALUE\fR
195Set a global preference.
196.TP
197.B set-volume \fBLEFT\fR \fBRIGHT\fR
0f55e905
RK
198Set the volume.
199.TP
200.B setup-guest \fR[\fB--no-online-registration\fR]
201Create the "guest" user for use by the web interface. This user will have no
202password and will only have the "read" and "register" rights, the latter
203allowing new users to automatically register themselves via the web interface.
204.IP
205With the option \fB--no-online-registration\fR, the "register" right is
206suppressed and users must be manually created by an administrator.
460b9539 207.TP
e86021e4
RK
208.B shutdown
209Shut down the daemon.
210.TP
460b9539 211.B stats
212List server statistics.
213.TP
214.B tags
215List known tags.
216.TP
217.B unset \fITRACK\fR \fIKEY\fR
218Unset the preference \fIKEY\fR for \fITRACK\fR.
219.TP
220.B unset-global \fIKEY\fR
221Unset the global preference \fIKEY\fR.
222.TP
dfb27dd6
RK
223.B userinfo \fIUSER PROPERTY
224Get some property of a user.
225.TP
a55c70c7
RK
226.B users
227List known users.
228.TP
460b9539 229.B version
230Report the daemon's version number.
231.PP
232For
233.B move
234and
235.BR remove ,
236tracks may be specified by name or by ID. If you use the name and a track
237appears twice in the queue it is undefined which is affected.
460b9539 238.SH PREFERENCES
239Currently the following preferences are supported. Some are expected
240to be set by users, others updated automatically by plugins.
241.TP
242.B pick_at_random
243If this preference is present and set to "0" then the track will not
244be picked for random play. Otherwise it may be.
245.TP
246.B played
247A decimal integer giving the number times the track was played. This
248includes tracks that are scratched or were picked at random.
249.TP
250.B played_time
251The last time the track was played, as a \fBtime_t\fR converted to a
252decimal integer.
253.TP
254.B scratched
255The number of times the track has been scratched.
256.TP
257.B requested
258A decimal integer giving the number of times the track was requested.
259(Tracks that are removed before being played are not counted.)
260.TP
261.B tags
262Tags that apply to this track, separated by commas. Tags can contain any
263printing character except comma. Leading and trailing spaces are not
264significant but internal spaces are.
265.IP
266Using the
267.B required-tags
268and
269.B prohibited-tags
270global preferences, it is possible to limit the tracks that will be selected at
271random.
272.TP
273.B trackname_\fICONTEXT\fB_\fIPART\fR
274These preferences can be used to override the filename parsing rules
275to find a track name part. For backwards compatibility,
276\fBtrackname_\fIPART\fR will be used if the full version
277is not present.
278.TP
279.B unscratched
280The number of times the track has been played to completion without
281being scratched.
460b9539 282.SH NOTES
283.B disorder
284is locale-aware. If you do not set the locale correctly then it may
285not handle non-ASCII data properly.
286.PP
e86021e4
RK
287The client determines which user to attempt to authenticate as by examining the
288current UID. This can be overridden in a per-user configuration file, see
289\fBdisorder_config\fR(5).
290.PP
291See \fBdisorder_protocol\fR(5) for the rights required to run each command.
292(For instance, \fBshutdown\fR requires the \fBadmin\fR right, which most users
293would not normally have.)
460b9539 294.PP
295This program is not intended to run in a setuid environment.
296.PP
297The regexp syntax used by the \fBfiles\fR and \fBdirs\fR commands use the
298syntax described in \fBpcrepattern\fR(3). Matching is case-independent. It is
299strongly recommended that you quote regexps, since they often contain
300characters treated specially by the shell. For example:
301.PP
302.B "disorder dirs /Music ~'^(?!the [^t])t'"
303.SH TROUBLESHOOTING
304If you cannot play a track, or it does not appear in the database even after a
305rescan, check the following things:
306.TP
307.B .
308Are there any error messages in the system log? The server logs to
309\fBLOG_DAEMON\fR, which typically ends up in
310.I /var/log/daemon.log
311or
312.IR /var/log/messages ,
313though this depends on local configuration.
314.TP
315.B .
316Is the track in a known format? Have a look at
317.I pkgconfdir/config
318for the formats recognized by the local installation. The filename matching is
319case-sensitive.
320.TP
321.B .
322Do permissions on the track allow the server to read it?
323.TP
324.B .
325Do the permissions on the containing directories allow the server to read and
326execute them?
327.PP
328The user the server runs as is determined by the \fBuser\fR directive in the
329configuration file. The README recommends using \fBjukebox\fR for this purpose
330but it could be different locally.
331.SH ENVIRONMENT
332.TP
333.B LOGNAME
334The default username.
335.TP
336.B HOME
337The user's home directory.
338.TP
339.B LC_ALL\fR, \fBLANG\fR, etc
340Current locale. See \fBlocale\fR(7).
341.SH FILES
342.TP
343.I pkgconfdir/config
344Global configuration file. See \fBdisorder_config\fR(5).
345.TP
346.I ~/.disorder/passwd
347Per-user password file
348.TP
349.I pkgstatedir/socket
350Communication socket for \fBdisorder\fR(1).
351.SH "SEE ALSO"
352\fBdisorderd\fR(8), \fBdisorder_config\fR(5), \fBsyslog\fR(3), \fBtime\fR(2),
353\fBpcrepattern\fR(3), \fBdisobedience\fR(1)
354.PP
355"\fBpydoc disorder\fR" for the Python API documentation.
356.\" Local Variables:
357.\" mode:nroff
358.\" fill-column:79
359.\" End: