chiark / gitweb /
documentation update
[disorder] / doc / disorder.1.in
CommitLineData
460b9539 1.\"
2.\" Copyright (C) 2004, 2005, 2006 Richard Kettlewell
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
57.B dirs \fIDIRECTORY\fR [\fB~\fIREGEXP\fR]
58List all the directories in \fIDIRECTORY\fR.
59.IP
60An optional regexp may be specified, marked with an initial \fB~\fR. Only
61directories with a basename matching the regexp will be returned.
62.TP
63.B disable
64Disables playing after the current track finishes.
65.TP
66.B enable
67(Re-)enable playing.
68.TP
69.B files \fIDIRECTORY\fR [\fB~\fIREGEXP\fR]
70List all the files in \fIDIRECTORY\fR.
71.IP
72An optional regexp may be specified, marked with an initial \fB~\fR. Only
73files with a basename matching the regexp will be returned.
74.TP
75.B get \fITRACK\fR \fIKEY\fR
76Display the preference \fIKEY\fR for \fITRACK\fR.
77.TP
78.B get-global \fIKEY\fR
79Get a global preference.
80.TP
81.B get-volume
82Displays the current volume settings.
83.TP
84.B length \fITRACK\fR
85Reports the length of \fITRACK\fR in seconds.
86.TP
87.B log
88Writes event log messages to standard output, until the server is terminated.
89See \fBdisorder_protocol\fR (5) for details of the output syntax.
90.TP
91.B move \fITRACK\fR \fIDELTA\fR
92Move
93.I TRACK
94by
95.I DELTA
96within the queue. Positive values move towards the head of the queue, negative
97values towards the tail.
98.IP
99Note that if you specify a negative value then the
100.B --
101option separate (before all commands) becomes mandatory, as otherwise the
102negative value is misinterpreted an an option.
103.TP
104.B part \fITRACK\fR \fICONTEXT\fI \fIPART\fR
105Get a track name part.
106.IP
107\fICONTEXT\fR should be either \fBsort\fR or \fBdisplay\fR. \fBpart\fR is the
108part of the name desired, typically \fBartist\fR, \fBalbum\fR or \fBtitle\fR.
109.TP
110.B pause
111Pause the current track. (Note that not all players support pausing.)
112.TP
113.B play \fITRACKS\fR...
114Add \fITRACKS\fR to the end of the queue.
115.TP
116.B playing
117Report the currently playing track.
118.TP
119.B prefs \fITRACK\fR
120Display all the preferences for \fITRACK\fR.
121.TP
122.B queue
123List the current queue. The first entry in the list is the next track to play.
124.TP
125.B random-disable
126Disable random play.
127.TP
128.B random-enable
129Enable random play.
130.TP
131.B recent
132List recently played tracks. The first entry is the oldest track, the last
133entry is the most recently played one.
134.TP
135.B remove \fITRACK\fR
136Remove a track from the queue.
137.TP
138.B resolve \fITRACK\fR
139Resolve aliases for \fITRACK\fR and print out the real track name.
140.TP
141.B resume
142Resume the current track after a pause.
143.TP
ca831831
RK
144.B rtp-address
145Report the RTP brodcast address used by the server (if any).
146.TP
460b9539 147.B scratch
148Scratch the currently playing track.
149.TP
150.B scratch-id \fIID\fR
151Scratch the currently playing track, provided it has the given ID.
152.TP
153.B search \fITERMS\fR
154Search for tracks containing all of the listed terms. The terms are
155separated by spaces and form a single argument, so must be quoted,
156for example:
157.IP
158.B "disorder search 'bowie china'"
159.IP
160You can limit the search to tracks with a particular tag, too, using the
161\fBtag:\fR modifier. For example:
162.IP
ca831831 163.B "disorder search 'love tag:depressing'"
460b9539 164.TP
165.B set \fITRACK\fR \fIKEY\fR \fIVALUE\fR
166Set the preference \fIKEY\fR for \fITRACK\fR to \fIVALUE\fR.
167.TP
168.B set-global \fIKEY\fR \fIVALUE\fR
169Set a global preference.
170.TP
171.B set-volume \fBLEFT\fR \fBRIGHT\fR
172Sets the volume.
173.TP
174.B stats
175List server statistics.
176.TP
177.B tags
178List known tags.
179.TP
180.B unset \fITRACK\fR \fIKEY\fR
181Unset the preference \fIKEY\fR for \fITRACK\fR.
182.TP
183.B unset-global \fIKEY\fR
184Unset the global preference \fIKEY\fR.
185.TP
186.B version
187Report the daemon's version number.
188.PP
189For
190.B move
191and
192.BR remove ,
193tracks may be specified by name or by ID. If you use the name and a track
194appears twice in the queue it is undefined which is affected.
195.SS "Privileged Commands"
196These commands are only available to privileged users.
197.TP
198.B become \fIUSER\fR
199Become another user.
200.TP
201.B reconfigure
202Make the daemon reload its configuration file.
203.TP
204.B rescan
205Rescan the filesystem for new tracks. There is an automatic daily rescan but
206if you've just added some tracks and want them to show up immediately, use this
207command.
208.TP
209.B shutdown
210Shut down the daemon.
211.SH PREFERENCES
212Currently the following preferences are supported. Some are expected
213to be set by users, others updated automatically by plugins.
214.TP
215.B pick_at_random
216If this preference is present and set to "0" then the track will not
217be picked for random play. Otherwise it may be.
218.TP
219.B played
220A decimal integer giving the number times the track was played. This
221includes tracks that are scratched or were picked at random.
222.TP
223.B played_time
224The last time the track was played, as a \fBtime_t\fR converted to a
225decimal integer.
226.TP
227.B scratched
228The number of times the track has been scratched.
229.TP
230.B requested
231A decimal integer giving the number of times the track was requested.
232(Tracks that are removed before being played are not counted.)
233.TP
234.B tags
235Tags that apply to this track, separated by commas. Tags can contain any
236printing character except comma. Leading and trailing spaces are not
237significant but internal spaces are.
238.IP
239Using the
240.B required-tags
241and
242.B prohibited-tags
243global preferences, it is possible to limit the tracks that will be selected at
244random.
245.TP
246.B trackname_\fICONTEXT\fB_\fIPART\fR
247These preferences can be used to override the filename parsing rules
248to find a track name part. For backwards compatibility,
249\fBtrackname_\fIPART\fR will be used if the full version
250is not present.
251.TP
252.B unscratched
253The number of times the track has been played to completion without
254being scratched.
255.SH "Superuser Commands"
256These commands will (generally) only work for root, who must be a privileged
257user.
258.TP
259.B authorize \fIUSER\fR
260Chooses a password for \fIUSER\fR and adds it to \fIconfig.private\fR. Also
261creates an appropriate \fIconfig.USER\fR, be owned by the user.
262.IP
263If at least one \fBauthorize\fR command succeeds then the server is
264automatically told to re-read its configuration.
265.SH NOTES
266.B disorder
267is locale-aware. If you do not set the locale correctly then it may
268not handle non-ASCII data properly.
269.PP
270The client determines which user to attempt to authenticate as by
271examining the current UID.
272.PP
273This program is not intended to run in a setuid environment.
274.PP
275The regexp syntax used by the \fBfiles\fR and \fBdirs\fR commands use the
276syntax described in \fBpcrepattern\fR(3). Matching is case-independent. It is
277strongly recommended that you quote regexps, since they often contain
278characters treated specially by the shell. For example:
279.PP
280.B "disorder dirs /Music ~'^(?!the [^t])t'"
281.SH TROUBLESHOOTING
282If you cannot play a track, or it does not appear in the database even after a
283rescan, check the following things:
284.TP
285.B .
286Are there any error messages in the system log? The server logs to
287\fBLOG_DAEMON\fR, which typically ends up in
288.I /var/log/daemon.log
289or
290.IR /var/log/messages ,
291though this depends on local configuration.
292.TP
293.B .
294Is the track in a known format? Have a look at
295.I pkgconfdir/config
296for the formats recognized by the local installation. The filename matching is
297case-sensitive.
298.TP
299.B .
300Do permissions on the track allow the server to read it?
301.TP
302.B .
303Do the permissions on the containing directories allow the server to read and
304execute them?
305.PP
306The user the server runs as is determined by the \fBuser\fR directive in the
307configuration file. The README recommends using \fBjukebox\fR for this purpose
308but it could be different locally.
309.SH ENVIRONMENT
310.TP
311.B LOGNAME
312The default username.
313.TP
314.B HOME
315The user's home directory.
316.TP
317.B LC_ALL\fR, \fBLANG\fR, etc
318Current locale. See \fBlocale\fR(7).
319.SH FILES
320.TP
321.I pkgconfdir/config
322Global configuration file. See \fBdisorder_config\fR(5).
323.TP
324.I ~/.disorder/passwd
325Per-user password file
326.TP
327.I pkgstatedir/socket
328Communication socket for \fBdisorder\fR(1).
329.SH "SEE ALSO"
330\fBdisorderd\fR(8), \fBdisorder_config\fR(5), \fBsyslog\fR(3), \fBtime\fR(2),
331\fBpcrepattern\fR(3), \fBdisobedience\fR(1)
332.PP
333"\fBpydoc disorder\fR" for the Python API documentation.
334.\" Local Variables:
335.\" mode:nroff
336.\" fill-column:79
337.\" End: