.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .ie \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .el \{\ . de IX .. .\} .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "MOOSICD 1" .TH MOOSICD 1 "2004-04-02" "Moosic 1.5.6" "" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" moosicd \- the server for the Moosic jukebox system. .SH "SYNOPSIS" .IX Header "SYNOPSIS" \&\fBmoosicd\fR \fB\-\-help\fR|\fB\-h\fR|\fB\-\-version\fR|\fB\-v\fR .PP \&\fBmoosicd\fR [\fB\-\-history\-size\fR|\fB\-s\fR \fIsize\fR] [\fB\-\-config\fR|\fB\-c\fR \fIdirectory\fR] [\fB\-\-quiet\fR|\fB\-q\fR|\fB\-\-debug\fR|\fB\-d\fR] [\fB\-S\fR|\fB\-\-stdout\fR] [\fB\-t\fR|\fB\-\-tcp\fR \fIport\fR] [\fB\-T\fR|\fB\-\-tcp\-also\fR \fIport\fR] [\fB\-l\fR|\fB\-\-local\-only\fR] .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\fBmoosicd\fR is the server for the Moosic jukebox system. It sits around, waiting to respond to commands given by a Moosic client (such as moosic(1)). It also maintains a queue of items to be played, and if this queue is not empty, it pops off the first item from the head of the queue and executes a user-configurable command on that item. When this command terminates, \&\fBmoosicd\fR goes on to the next item in its queue, assuming that the queue is not empty. .PP \&\fBmoosicd\fR is not meant to be used as a system-wide daemon that serves all users on a system. Rather, every user that wishes to use Moosic should start a separate instance of \fBmoosicd\fR, and one user cannot communicate with the Moosic server of another user without taking special measures (i.e. using the \fB\-c\fR or \&\fB\-t\fR options to \fBmoosic\fR). .SH "OPTIONS" .IX Header "OPTIONS" \&\fBmoosicd\fR is designed so that you normally don't need to use any of these options. .IP "\fB\-h\fR, \fB\-\-help\fR" 4 .IX Item "-h, --help" Prints help text and exits. .IP "\fB\-v\fR, \fB\-\-version\fR" 4 .IX Item "-v, --version" Prints version information and exits. .IP "\fB\-s\fR \fIsize\fR, \fB\-\-history\-size\fR \fIsize\fR" 4 .IX Item "-s size, --history-size size" \&\fBmoosicd\fR remembers the file names of previous songs that it played. This option sets the maximum size of this history list. The default value is 50. .IP "\fB\-f\fR, \fB\-\-foreground\fR" 4 .IX Item "-f, --foreground" By default, \fBmoosicd\fR detaches itself from the current terminal and puts itself in the background (i.e. it becomes a daemon). This option disables such behavior. .IP "\fB\-S\fR, \fB\-\-stdout\fR" 4 .IX Item "-S, --stdout" By default, \fBmoosicd\fR logs almost all of its printed output to a file. When this option is used, the output is instead printed to the standard output device. This also prevents the program from putting itself in the background and detaching from the current terminal. .IP "\fB\-q\fR, \fB\-\-quiet\fR" 4 .IX Item "-q, --quiet" This option suppresses almost all printed output from \fBmoosicd\fR. Note that, by default, \fBmoosicd\fR prints this output to a file, not the standard output device. .IP "\fB\-d\fR, \fB\-\-debug\fR" 4 .IX Item "-d, --debug" This option causes \fBmoosicd\fR to print lots and lots of messages about what it's doing. These messages are usually quite superfluous and bothersome. Note that unless the \fB\-S\fR option is used these messages will appear in the log file instead of the standard output device. .IP "\fB\-c\fR \fIdirectory\fR, \fB\-\-config\fR \fIdirectory\fR" 4 .IX Item "-c directory, --config directory" Specifies the directory where moosicd should keep the various files that it uses. The default directory is \fI~/.moosic/\fR. This option is useful only in extraordinary circumstances. If this option is used, any Moosic clients that wish to communicate with \fBmoosicd\fR must be told to use the specified directory instead of the default. .IP "\fB\-t\fR \fIport\fR, \fB\-\-tcp\fR \fIport\fR" 4 .IX Item "-t port, --tcp port" This option directs the server to listen to the given \s-1TCP\s0 port number for client requests instead of using the normal communication method. Use of this option without the \fB\-l\fR option is \fIhighly discouraged\fR unless you know what you are doing because there is no guarantee that \fBmoosicd\fR is secure against malicious input from a remote location. Note that an instance of \fBmoosicd\fR which is started with this option will not accept requests from a client that is using the normal communication method. .IP "\fB\-T\fR \fIport\fR, \fB\-\-tcp\-also\fR \fIport\fR" 4 .IX Item "-T port, --tcp-also port" This option directs the server to listen to the given \s-1TCP\s0 port number for client requests in addition to using the normal communication method. Use of this option without the \fB\-l\fR option is \fIhighly discouraged\fR unless you know what you are doing because there is no guarantee that \fBmoosicd\fR is secure against malicious input from a remote location. .IP "\fB\-l\fR, \fB\-\-local\-only\fR" 4 .IX Item "-l, --local-only" This directs the server to only listen for \s-1TCP\s0 connections that originate from the local computer, refusing connections from remote hosts. This only has an effect when \fB\-\-tcp\fR or \fB\-\-tcp\-also\fR is used. .SH "CONFIGURATION" .IX Header "CONFIGURATION" \&\fBmoosicd\fR figures out how to play items in its queue by consulting its configuration file, which associates string patterns (in the form of Perl-compatible regular expressions) with commands. .PP The format of this file is as follows: Every pair of lines forms a unit. The first line in a pair is a regular expression that will be matched against items in the queue. The second line in a pair is the command that will be used to play any items that match the regular expression. The name of the item to be played will be appended to the end of this command, unless the command line includes a special substitution string. .PP The simplest kind of substitution string is \*(L"$item\*(R". Every occurrence of \&\*(L"$item\*(R" in the command will be replaced with the name of the song to be played. The other kind of substitution is called \*(L"matched group substitution\*(R", and is used to refer to specific parts of the name of the song to be played. .PP The command will not be interpreted by a shell, so don't bother trying to use shell variables or globbing or I/O redirection, and be mindful of how you use quotes and parentheses. If you need any of these fancy features, wrap up the command in a real shell script (and remember to use an \*(L"exec\*(R" statement in your shell script to invoke the program that does the actual song playing, otherwise Moosic won't be able to do things like stop or pause the song). .PP Blank lines and lines starting with a '#' character are ignored. Regular expressions specified earlier in this file take precedence over those specified later. .SH "FILES" .IX Header "FILES" \&\fBmoosicd\fR makes use of several files, all of which are found in the \&\fI.moosic/\fR directory in the home directory of the user who invoked the program (unless the \-c or \-\-config option is used). .IP "\fIconfig\fR" 4 .IX Item "config" This is the configuration file that \fBmoosicd\fR uses to associate file-types to player commands, as explained above. .IP "\fIserver_log\fR" 4 .IX Item "server_log" \&\fBmoosicd\fR logs short notices of its activities to this file unless the \fB\-S\fR option is used. It usually contains nothing more than a history of what songs have been played. .IP "\fIplayer_log\fR" 4 .IX Item "player_log" This file contains the output of the player commands which are spawned by \&\fBmoosicd\fR. .IP "\fIsocket\fR" 4 .IX Item "socket" This is a socket file which is (normally) used to allow Moosic clients to contact the Moosic server. If \fBmoosicd\fR isn't shut down properly, this file will need to be removed by hand. You should leave this file alone under other circumstances. .SH "SEE ALSO" .IX Header "SEE ALSO" moosic(1), the standard command-line Moosic client. .PP The chapter entitled \*(L"Regular Expression Syntax\*(R" http://www.python.org/doc/current/lib/re\-syntax.html from the section dealing with the \fBre\fR module in the \fIPython Library Reference\fR, for details on the syntax of a regular expression. .SH "AUTHOR" .IX Header "AUTHOR" Daniel Pearson