chiark / gitweb /
Merge playlist branch against trunk to date.
[disorder] / doc / disorder.1.in
CommitLineData
460b9539 1.\"
5aff007d 2.\" Copyright (C) 2004-2008 Richard Kettlewell
460b9539 3.\"
e7eb3a27 4.\" This program is free software: you can redistribute it and/or modify
460b9539 5.\" it under the terms of the GNU General Public License as published by
e7eb3a27 6.\" the Free Software Foundation, either version 3 of the License, or
460b9539 7.\" (at your option) any later version.
e7eb3a27
RK
8.\"
9.\" This program is distributed in the hope that it will be useful,
10.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
11.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12.\" GNU General Public License for more details.
13.\"
460b9539 14.\" You should have received a copy of the GNU General Public License
e7eb3a27 15.\" along with this program. If not, see <http://www.gnu.org/licenses/>.
460b9539 16.\"
17.TH disorder 1
18.SH NAME
19disorder \- DisOrder jukebox client
20.SH SYNOPSIS
21.B disorder
22.RI [ OPTIONS ]
0d350ff0 23.RB [ \-\- ]
460b9539 24.RI [ COMMANDS ...]
460b9539 25.SH DESCRIPTION
460b9539 26.B disorder
27is used to query the \fBdisorderd\fR(8) daemon from the command line.
28It may be used to request tracks, scratch tracks, query the current
29state, etc, and by an administrator to shutdown or reconfigure the
30daemon.
31.PP
32If no commands are specified then \fBdisorder\fR connects to the
c0c23a60
RK
33daemon and then immediately disconnects.
34This can be used to test whether the daemon is running.
35Otherwise, it executes the commands specified.
3d1452ab
RK
36.PP
37This man page documents the command-line client.
38See \fBdisorderd\fR (8) for information about the server process
39and \fBdisorder_config\fR (5) for documentation of the configuration file.
460b9539 40.SH OPTIONS
41.TP
0d350ff0 42.B \-\-config \fIPATH\fR, \fB\-c \fIPATH
c0c23a60
RK
43Set the configuration file.
44The default is
460b9539 45.IR pkgconfdir/config .
46.TP
0d350ff0 47.B \-\-debug\fR, \fB\-d
460b9539 48Enable debugging.
49.TP
0d350ff0 50.B \-\-help\fR, \fB\-h
460b9539 51Display a usage message.
52.TP
0d350ff0 53.B \-\-version\fR, \fB\-V
460b9539 54Display version number.
55.TP
0d350ff0 56.B \-\-help\-commands\fR, \fB\-H
460b9539 57List all known commands.
58.SH COMMANDS
59.TP
90ad6c6e 60.B adduser \fIUSERNAME PASSWORD\fR [\fIRIGHTS\fR]
c0c23a60
RK
61Create a new user.
62If \fIRIGHTS\fR is not specified then the \fBdefault_rights\fR
63setting from the server's configuration file applies.
0f55e905 64.TP
edff49e6
RK
65.B adopt \fIID\fR
66Adopts track \fIID\fR (in the queue).
67The track will show up as submitted by the calling user.
68.TP
90ad6c6e
RK
69.B authorize \fIUSERNAME\fR [\fIRIGHTS\fR]
70Create user \fIUSERNAME\fR with a random password.
71User \fIUSERNAME\fR must be a UNIX login user (not just any old string).
c0c23a60
RK
72If \fIRIGHTS\fR is not specified then the \fBdefault_rights\fR
73setting from the server's configuration file applies.
e86021e4 74.IP
90ad6c6e 75\fI~USERNAME/.disorder/passwd\fR is created with the password in it, so the new
5b14453f
RK
76user should be able to log in immediately.
77.IP
78If writing the \fIpasswd\fR file fails then the user will already have been
c0c23a60
RK
79created in DisOrder's user database.
80Use \fBdisorder deluser\fR to remove them before trying again.
e86021e4 81.TP
90ad6c6e 82.B deluser \fIUSERNAME\fR
a55c70c7
RK
83Delete a user.
84.TP
460b9539 85.B dirs \fIDIRECTORY\fR [\fB~\fIREGEXP\fR]
86List all the directories in \fIDIRECTORY\fR.
87.IP
c0c23a60
RK
88An optional regexp may be specified, marked with an initial \fB~\fR.
89Only directories with a basename matching the regexp will be returned.
460b9539 90.TP
91.B disable
0f55e905 92Disable playing after the current track finishes.
460b9539 93.TP
90ad6c6e 94.B edituser \fIUSERNAME PROPERTY VALUE
a55c70c7
RK
95Set some property of a user.
96.TP
460b9539 97.B enable
98(Re-)enable playing.
99.TP
100.B files \fIDIRECTORY\fR [\fB~\fIREGEXP\fR]
101List all the files in \fIDIRECTORY\fR.
102.IP
c0c23a60
RK
103An optional regexp may be specified, marked with an initial \fB~\fR.
104Only files with a basename matching the regexp will be returned.
460b9539 105.TP
106.B get \fITRACK\fR \fIKEY\fR
107Display the preference \fIKEY\fR for \fITRACK\fR.
3d1452ab 108See \fBdisorder_preferences\fR (5).
460b9539 109.TP
0d350ff0 110.B get\-global \fIKEY\fR
460b9539 111Get a global preference.
3d1452ab 112See \fBdisorder_preferences\fR (5).
460b9539 113.TP
0d350ff0 114.B get\-volume
0f55e905 115Display the current volume settings.
460b9539 116.TP
117.B length \fITRACK\fR
0f55e905 118Display the length of \fITRACK\fR in seconds.
460b9539 119.TP
120.B log
0f55e905 121Write event log messages to standard output, until the server is terminated.
460b9539 122See \fBdisorder_protocol\fR (5) for details of the output syntax.
123.TP
124.B move \fITRACK\fR \fIDELTA\fR
125Move
126.I TRACK
127by
128.I DELTA
c0c23a60
RK
129within the queue.
130Positive values move towards the head of the queue, negative
460b9539 131values towards the tail.
132.IP
133Note that if you specify a negative value then the
0d350ff0 134.B \-\-
460b9539 135option separate (before all commands) becomes mandatory, as otherwise the
136negative value is misinterpreted an an option.
137.TP
138.B part \fITRACK\fR \fICONTEXT\fI \fIPART\fR
139Get a track name part.
140.IP
c0c23a60
RK
141\fICONTEXT\fR should be either \fBsort\fR or \fBdisplay\fR.
142\fBpart\fR is the part of the name desired, typically \fBartist\fR,
143\fBalbum\fR or \fBtitle\fR.
460b9539 144.TP
145.B pause
c0c23a60
RK
146Pause the current track.
147(Note that not all players support pausing.)
460b9539 148.TP
149.B play \fITRACKS\fR...
150Add \fITRACKS\fR to the end of the queue.
151.TP
152.B playing
153Report the currently playing track.
154.TP
58865bb5
RK
155.B playlist-del \fIPLAYLIST\fR
156Deletes playlist \fIPLAYLIST\fR.
157.TP
158.B playlist-get \fIPLAYLIST\fR
159Gets the contents of playlist \fIPLAYLIST\fR.
160.TP
161.B playlist-set \fIPLAYLIST\fR [\fIPATH\fR]
162Set the contents of playlist \fIPLAYLIST\fR.
163If an absolute path name is specified then the track list is read from
164that filename.
165Otherwise the track list is read from standard input.
166In either case, the list is terminated either by end of file or by a line
167containing a single ".".
168.TP
169.B playlists
170Lists known playlists (in no particular order).
171.TP
460b9539 172.B prefs \fITRACK\fR
173Display all the preferences for \fITRACK\fR.
3d1452ab 174See \fBdisorder_preferences\fR (5).
460b9539 175.TP
176.B queue
c0c23a60
RK
177List the current queue.
178The first entry in the list is the next track to play.
460b9539 179.TP
0d350ff0 180.B random\-disable
460b9539 181Disable random play.
182.TP
0d350ff0 183.B random\-enable
460b9539 184Enable random play.
185.TP
186.B recent
c0c23a60
RK
187List recently played tracks.
188The first entry is the oldest track, the last entry is the most
189recently played one.
460b9539 190.TP
e86021e4
RK
191.B reconfigure
192Make the daemon reload its configuration file.
193.TP
460b9539 194.B remove \fITRACK\fR
195Remove a track from the queue.
196.TP
e86021e4 197.B rescan
c0c23a60
RK
198Rescan the filesystem for new tracks.
199There is an automatic daily rescan but if you've just added some tracks
200and want them to show up immediately, use this command.
e86021e4 201.TP
460b9539 202.B resolve \fITRACK\fR
203Resolve aliases for \fITRACK\fR and print out the real track name.
204.TP
205.B resume
206Resume the current track after a pause.
207.TP
0d350ff0 208.B rtp\-address
ca831831
RK
209Report the RTP brodcast address used by the server (if any).
210.TP
758aa6c3
RK
211.B schedule-del \fIEVENT\fR
212Delete a scheduled event.
213.TP
214.B schedule-list
215List scheduled events.
216Each line contains the ID, a timestamp, 'N' or 'J' for normal or junk priority,
217the user, the action and action-specific data.
218.TP
219.B schedule-play \fIWHEN PRIORITY TRACK\fI
d436bd52
RK
220Play \fITRACK\fR at time \fIWHEN\fR.
221Various time/date formats are supported depending on locale but the following
222three will always work:
223.RS
224.RS
225.TP
226.B "YYYY-MM-DD HH:MM:SS"
227.TP
228.B "HH:MM:SS"
229.TP
230.B "HH:MM"
231.RE
232.RE
758aa6c3
RK
233.IP
234\fIPRIORITY\fR should be \fBjunk\fR or \fBnormal\fR.
235This determines how the event is handled if it becomes due when the server is
236down.
237Junk events are just discarded in this case, while normal events will be
238executed when the server comes back up, even if this is much later.
239.TP
240.B schedule-set-global \fIWHEN PRIORITY NAME VALUE\fI
241Set global preference \fINAME\fR to \fIVALUE\fR at time \fIWHEN\fR.
242.TP
243.B schedule-unset-global \fIWHEN PRIORITY NAME\fI
244Unset global preference \fINAME\fR at time \fIWHEN\fR.
245.TP
460b9539 246.B scratch
247Scratch the currently playing track.
248.TP
0d350ff0 249.B scratch\-id \fIID\fR
460b9539 250Scratch the currently playing track, provided it has the given ID.
251.TP
252.B search \fITERMS\fR
c0c23a60
RK
253Search for tracks containing all of the listed terms.
254The terms are separated by spaces and form a single argument,
255so must be quoted, for example:
460b9539 256.IP
257.B "disorder search 'bowie china'"
258.IP
259You can limit the search to tracks with a particular tag, too, using the
c0c23a60
RK
260\fBtag:\fR modifier.
261For example:
460b9539 262.IP
ca831831 263.B "disorder search 'love tag:depressing'"
460b9539 264.TP
265.B set \fITRACK\fR \fIKEY\fR \fIVALUE\fR
266Set the preference \fIKEY\fR for \fITRACK\fR to \fIVALUE\fR.
3d1452ab 267See \fBdisorder_preferences\fR (5).
460b9539 268.TP
0d350ff0 269.B set\-global \fIKEY\fR \fIVALUE\fR
460b9539 270Set a global preference.
3d1452ab 271See \fBdisorder_preferences\fR (5).
460b9539 272.TP
0d350ff0 273.B set\-volume \fBLEFT\fR \fBRIGHT\fR
0f55e905
RK
274Set the volume.
275.TP
0d350ff0 276.B setup\-guest \fR[\fB\-\-no\-online\-registration\fR]
c0c23a60
RK
277Create the "guest" user for use by the web interface.
278This user will have no password and will only have the "read" and
279"register" rights, the latter allowing new users to automatically
280register themselves via the web interface.
0f55e905 281.IP
0d350ff0 282With the option \fB\-\-no-online\-registration\fR, the "register" right is
0f55e905 283suppressed and users must be manually created by an administrator.
f1592969 284.IP
285If online registration is desired then \fBmail_sender\fR must be set in the
c0c23a60
RK
286configuration file.
287See \fBdisorder_config\fR(5).
460b9539 288.TP
e86021e4
RK
289.B shutdown
290Shut down the daemon.
291.TP
460b9539 292.B stats
293List server statistics.
294.TP
295.B tags
296List known tags.
297.TP
298.B unset \fITRACK\fR \fIKEY\fR
299Unset the preference \fIKEY\fR for \fITRACK\fR.
3d1452ab 300See \fBdisorder_preferences\fR (5).
460b9539 301.TP
0d350ff0 302.B unset\-global \fIKEY\fR
460b9539 303Unset the global preference \fIKEY\fR.
3d1452ab 304See \fBdisorder_preferences\fR (5).
460b9539 305.TP
90ad6c6e 306.B userinfo \fIUSERNAME PROPERTY
dfb27dd6
RK
307Get some property of a user.
308.TP
a55c70c7
RK
309.B users
310List known users.
311.TP
460b9539 312.B version
313Report the daemon's version number.
314.PP
315For
316.B move
317and
318.BR remove ,
c0c23a60
RK
319tracks may be specified by name or by ID.
320If you use the name and a track appears twice in the queue it is
321undefined which is affected.
460b9539 322.SH NOTES
323.B disorder
c0c23a60
RK
324is locale-aware.
325If you do not set the locale correctly then it may not handle non-ASCII
326data properly.
460b9539 327.PP
e86021e4 328The client determines which user to attempt to authenticate as by examining the
c0c23a60
RK
329current UID.
330This can be overridden in a per-user configuration file, see
e86021e4
RK
331\fBdisorder_config\fR(5).
332.PP
333See \fBdisorder_protocol\fR(5) for the rights required to run each command.
334(For instance, \fBshutdown\fR requires the \fBadmin\fR right, which most users
335would not normally have.)
460b9539 336.PP
337This program is not intended to run in a setuid environment.
338.PP
339The regexp syntax used by the \fBfiles\fR and \fBdirs\fR commands use the
c0c23a60
RK
340syntax described in \fBpcrepattern\fR(3).
341Matching is case-independent.
342It is strongly recommended that you quote regexps, since they often
343contain characters treated specially by the shell.
344For example:
460b9539 345.PP
346.B "disorder dirs /Music ~'^(?!the [^t])t'"
347.SH TROUBLESHOOTING
348If you cannot play a track, or it does not appear in the database even after a
349rescan, check the following things:
350.TP
351.B .
352Are there any error messages in the system log? The server logs to
353\fBLOG_DAEMON\fR, which typically ends up in
354.I /var/log/daemon.log
355or
356.IR /var/log/messages ,
357though this depends on local configuration.
358.TP
359.B .
360Is the track in a known format? Have a look at
361.I pkgconfdir/config
c0c23a60
RK
362for the formats recognized by the local installation.
363The filename matching is case-sensitive.
460b9539 364.TP
365.B .
366Do permissions on the track allow the server to read it?
367.TP
368.B .
369Do the permissions on the containing directories allow the server to read and
370execute them?
371.PP
372The user the server runs as is determined by the \fBuser\fR directive in the
c0c23a60
RK
373configuration file.
374The README recommends using \fBjukebox\fR for this purpose but it could
375be different locally.
460b9539 376.SH ENVIRONMENT
377.TP
460b9539 378.B HOME
379The user's home directory.
380.TP
381.B LC_ALL\fR, \fBLANG\fR, etc
c0c23a60
RK
382Current locale.
383See \fBlocale\fR(7).
460b9539 384.SH FILES
385.TP
386.I pkgconfdir/config
c0c23a60
RK
387Global configuration file.
388See \fBdisorder_config\fR(5).
460b9539 389.TP
390.I ~/.disorder/passwd
391Per-user password file
392.TP
393.I pkgstatedir/socket
394Communication socket for \fBdisorder\fR(1).
395.SH "SEE ALSO"
396\fBdisorderd\fR(8), \fBdisorder_config\fR(5), \fBsyslog\fR(3), \fBtime\fR(2),
3d1452ab 397\fBpcrepattern\fR(3), \fBdisobedience\fR(1), \fBdisorder.cgi\fR(8),
9ce569e5 398\fBdisorder_preferences\fR(5)
460b9539 399.PP
400"\fBpydoc disorder\fR" for the Python API documentation.
401.\" Local Variables:
402.\" mode:nroff
403.\" fill-column:79
404.\" End: