This file is indexed.

/usr/share/doc/moosic/html/moosic.html is in moosic 1.5.6-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>moosic - a command-line client for the Moosic jukebox system.</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:root@localhost" />
</head>

<body style="background-color: white">


<!-- INDEX BEGIN -->
<div name="index">
<p><a name="__index__"></a></p>

<ul>

	<li><a href="#name">NAME</a></li>
	<li><a href="#synopsis">SYNOPSIS</a></li>
	<li><a href="#description">DESCRIPTION</a></li>
	<li><a href="#usage">USAGE</a></li>
	<li><a href="#options">OPTIONS</a></li>
	<li><a href="#commands">COMMANDS</a></li>
	<ul>

		<li><a href="#querying_for_information">Querying for information</a></li>
		<li><a href="#adding_to_the_song_queue">Adding to the song queue</a></li>
		<li><a href="#removing_from_the_song_queue">Removing from the song queue</a></li>
		<li><a href="#rearranging_the_song_queue">Rearranging the song queue</a></li>
		<li><a href="#general_management">General management</a></li>
	</ul>

	<li><a href="#audio_cd_support">AUDIO CD SUPPORT</a></li>
	<li><a href="#files">FILES</a></li>
	<li><a href="#see_also">SEE ALSO</a></li>
	<li><a href="#author">AUTHOR</a></li>
</ul>

<hr name="index" />
</div>
<!-- INDEX END -->

<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>moosic - a command-line client for the Moosic jukebox system.</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<p><strong>moosic</strong> [<em>options</em>] <em>command</em> [<em>options</em>] [<em>command arguments</em>]</p>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>The <strong>moosic</strong> program is the command-line interface to the Moosic jukebox
system.  It communicates with <a href="././moosicd.html">the moosicd manpage</a>(1), the Moosic server, querying the
server for information and telling the server what to do.  <strong>moosic</strong> will not be
able to do very much unless <strong>moosicd</strong> is running.  When <strong>moosicd</strong> isn't already
running, <strong>moosic</strong> will automatically start it for you, unless you specifically
request otherwise (with the --no-startserver option).</p>
<p>
</p>
<hr />
<h1><a name="usage">USAGE</a></h1>
<p><strong>moosic</strong> works by sending a command to the Moosic server and returning the
response, if any.  The first non-option argument given to <strong>moosic</strong> is the name
of the command to be performed.  This command name is case-insensitive, and all
non-alphanumeric characters in it are ignored.  You can use the &quot;help&quot; command
to quickly and easily view the names of all the available commands and to get a
brief description of individual commands.  You can also use <code>moosic
--showcommands</code> to display the short descriptions of all the commands at once.
The <a href="#commands">COMMANDS</a> section below lists the full details of each command.  There
are very many commands, so you should start by just learning a few commonly used
commands, and only learning others as you feel the need.  I recommend starting
with the following short command vocabulary: add, list, stop, play, and shuffle.</p>
<p>For example, <code>moosic add foo.mp3</code> adds the file <em class="file">foo.mp3</em> (in the current
directory) to the end of the song queue and returns you immediately back to your
shell prompt without printing any output (unless an error occurs).  Compare with
<code>moosic list</code>, which will list the contents of the song queue.  Note that if
the song queue is empty, <code>moosic list</code> will not display anything.</p>
<p>
</p>
<hr />
<h1><a name="options">OPTIONS</a></h1>
<p>Most of the options for <strong>moosic</strong> are only relevant if they are used with one of
the commands that take a <em>filelist</em> argument.  See <a href="#commands">COMMANDS</a> for the
definition of a <em>filelist</em>.  The only shuffling options that don't mutually
exclude each other are <strong>-d</strong> and <strong>-a</strong>.  Shuffling options that are named later
on the command line take precedence over ones that occur earlier.  All options
must be named immediately before the <em>command</em> given to <strong>moosic</strong> or
immediately after the <em>command</em>; options placed within the list of the
command's arguments will not be interpreted as options.</p>
<dl>
<dt><strong><a name="g_shuffle_global" class="item"><strong>-g</strong>, <strong>--shuffle-global</strong></a></strong></dt>

<dd>
<p>This option causes <strong>moosic</strong> to shuffle the entire <em>filelist</em> after directory
expansion has taken place, before sending the <em>filelist</em> to the Moosic server.
This is the default behavior.  This option is only meaningful if used in
conjunction with a command that accepts a <em>filelist</em>.</p>
</dd>
<dt><strong><a name="d_shuffle_dir" class="item"><strong>-d</strong>, <strong>--shuffle-dir</strong></a></strong></dt>

<dd>
<p>This option causes <strong>moosic</strong> to shuffle the results of expanding the
directories named in the <em>filelist</em>.  This option is only meaningful if used in
conjunction with a command that accepts a <em>filelist</em>.</p>
</dd>
<dt><strong><a name="a_shuffle_args" class="item"><strong>-a</strong>, <strong>--shuffle-args</strong></a></strong></dt>

<dd>
<p>This option causes <strong>moosic</strong> to shuffle the actual command line arguments that
comprise the <em>filelist</em>.  This option is only meaningful if used in conjunction
with a command that accepts a <em>filelist</em>.</p>
</dd>
<dt><strong><a name="o_inorder" class="item"><strong>-o</strong>, <strong>--inorder</strong></a></strong></dt>

<dd>
<p>When this option is used, <strong>moosic</strong> doesn't shuffle the <em>filelist</em> named on the
command line at all.  Rather, the order specified on the command line is
preserved.  This option is only meaningful if used in conjunction with a command
that accepts a <em>filelist</em>.</p>
</dd>
<dt><strong><a name="s_sort" class="item"><strong>-s</strong>, <strong>--sort</strong></a></strong></dt>

<dd>
<p>When this option is used, <strong>moosic</strong> sorts the <em>filelist</em> lexicographically
after it has been expanded (through directory recursion or auto-finding or the
like).  The order specified on the command line is ignored.  This option is only
meaningful if used in conjunction with a command that accepts a <em>filelist</em>.</p>
</dd>
<dt><strong><a name="r_no_recurse" class="item"><strong>-r</strong>, <strong>--no-recurse</strong></a></strong></dt>

<dd>
<p>Using this option prevents <strong>moosic</strong> from replacing directories named in the
<em>filelist</em> with a recursive traversal of their contents.</p>
</dd>
<dt><strong><a name="n_no_file_munge" class="item"><strong>-n</strong>, <strong>--no-file-munge</strong></a></strong></dt>

<dd>
<p>Using this option prevents <strong>moosic</strong> from modifying the names in the expanded
<em>filelist</em>.  Normally, <strong>moosic</strong> converts relative filenames into absolute
filenames before sending the names to <strong>moosicd</strong>, but this is generally not
desirable behavior if you want to insert items that aren't local files into the
queue (such as URLs).  This option is only meaningful if used in conjunction with
a command that accepts a <em>filelist</em>.</p>
</dd>
<dt><strong><a name="i_ignore_case" class="item"><strong>-i</strong>, <strong>--ignore-case</strong></a></strong></dt>

<dd>
<p>Treats any given regular expressions as if they were case-insensitive.  This
option is only meaningful if used in conjunction with a command that accepts one
or more regular expressions as arguments.  This option is syntactic sugar, since
the regular expressions supported by Moosic can also be made case-insensitive by
including &quot;(?i)&quot; within the regular expression.</p>
</dd>
<dt><strong><a name="f_auto_find" class="item"><strong>-f</strong>, <strong>--auto-find</strong></a></strong></dt>

<dd>
<p>This option causes each string in the <em>filelist</em> with the results of performing
a &quot;fuzzy&quot; search for music files.  &quot;Fuzzy&quot; matching is done by simplifying all
the candidate filenames (by lowering the case and removing all non-alphanumeric
characters except slashes) and then testing to see if the search string (which
has been similarly simplified) is contained in any of the filenames.  The list
of candidate filenames is obtained by recursively traversing the file hierarchy
rooted at the directory specified by the <strong>--music-dir</strong> option (which has a
default value of <em class="file">~/music/</em>).</p>
<p>For example, if you use <code>moosic -f add severedgoddess</code>, and the file
<em class="file">~/music/Meat_Puppets/Severed_Goddess_Hand.mp3</em> exists, then this file will be
included in the list of files to be added to the queue.  Similarly, if you use
<code>moosic -f pre nesad</code>, and the directory <em class="file">~/music/J/Jane's Addiction/</em> exists,
then all the files in this directory (and its subdirectories) will be included
in the list of files to be prepended to the queue.</p>
<p>This option is only meaningful if used in conjunction with a command that
accepts a <em>filelist</em>.  Beware that using this option can cause <strong>moosic</strong> to
take a long time to complete if the directory tree being searched contains a
very large number of files.</p>
</dd>
<dt><strong><a name="f_auto_grep" class="item"><strong>-F</strong>, <strong>--auto-grep</strong></a></strong></dt>

<dd>
<p>This option enables behavior very much like that of the <strong>--auto-find</strong> option,
except that regular expression searching is used instead of the &quot;fuzzy&quot; search
scheme.  Specifically, each string in the <em>filelist</em> is treated as a regular
expression, and is replaced with all the filenames that match the expression.
As with <strong>--auto-find</strong>, the filenames that are eligible for matching are
obtained by traversing the directory named with the <strong>--music-dir</strong> option
(defaulting to <em class="file">~/music/</em> if <strong>--music-dir</strong> is not used).  Essentially,
<code>moosic -F prepend something</code> is semantically equivalent to
<code>moosic prepend `find ~/music/ | grep something`</code>, but is syntactically a lot
sweeter.</p>
<p>This option is only meaningful if used in conjunction with a command that
accepts a <em>filelist</em>.  Beware that using this option can cause <strong>moosic</strong> to
take a long time to complete if the directory tree being searched contains a
very large number of files.</p>
</dd>
<dt><strong><a name="m_directory_music_dir_directory" class="item"><strong>-m</strong> <em>directory</em>, <strong>--music-dir</strong> <em>directory</em></a></strong></dt>

<dd>
<p>This option controls which directory is used for searching when the &quot;auto-find&quot;
or &quot;auto-grep&quot; feature is enabled.  These automatic searches are limited to the
file hierarchy rooted at the directory specified by this option.  When this
option is not used, the <em class="file">~/music/</em> directory is used as a default.  This option
is only meaningful if either <strong>--auto-find</strong> or <strong>--auto-grep</strong> is used.</p>
</dd>
<dt><strong><a name="s_showcommands" class="item"><strong>-S</strong>, <strong>--showcommands</strong></a></strong></dt>

<dd>
<p>Prints a list of the commands that may be used with <strong>moosic</strong> and then exits.
Note that this output is quite copious, so you will probably want to pipe it to
a text pager, such as <strong>less</strong>.</p>
</dd>
<dt><strong><a name="h_help" class="item"><strong>-h</strong>, <strong>--help</strong></a></strong></dt>

<dd>
<p>Prints a short help message that explains the command line options and then
exits.</p>
</dd>
<dt><strong><a name="v_version" class="item"><strong>-v</strong>, <strong>--version</strong></a></strong></dt>

<dd>
<p>Prints version information and then exits.</p>
</dd>
<dt><strong><a name="c_directory_config_dir_directory" class="item"><strong>-c</strong> <em>directory</em>, <strong>--config-dir</strong> <em>directory</em></a></strong></dt>

<dd>
<p>This option is not needed under normal circumstances.  It should only be used
if you want <strong>moosic</strong> to communicate with an instance of <strong>moosicd</strong> which was
invoked with the <strong>-c</strong>/<strong>--config</strong> option.  Using this option tells <strong>moosic</strong>
to search the specified directory for the files which are usually found in
<em>~/.moosic/</em>.</p>
</dd>
<dt><strong><a name="t_host_port_tcp_host_port" class="item"><strong>-t</strong> <em>host</em>:<em>port</em>, <strong>--tcp</strong> <em>host</em>:<em>port</em></a></strong></dt>

<dd>
<p>This option tells <strong>moosic</strong> to communicate with a Moosic server that is
listening to the specified TCP/IP port on the specified host.  Running a Moosic
server that accepts requests via TCP/IP is not recommended because it is a
security risk.</p>
</dd>
<dt><strong><a name="n_no_startserver" class="item"><strong>-N</strong>, <strong>--no-startserver</strong></a></strong></dt>

<dd>
<p>This option prevents <strong>moosic</strong> from trying to automatically start <strong>moosicd</strong> if
it can't contact a Moosic server.</p>
</dd>
<dt><strong><a name="u_allow_unplayable" class="item"><strong>-U</strong>, <strong>--allow-unplayable</strong></a></strong></dt>

<dd>
<p>This option allows songs that the server doesn't know how to play to be added
into the song queue.</p>
</dd>
<dt><strong><a name="c_current_in_list" class="item"><strong>-C</strong>, <strong>--current-in-list</strong></a></strong></dt>

<dd>
<p>This option causes the currently playing song to be printed at the top of the
output of the &quot;list&quot; and &quot;plainlist&quot; commands.  It has no effect if an argument
is given to these commands or if used with other commands.</p>
</dd>
</dl>
<p>
</p>
<hr />
<h1><a name="commands">COMMANDS</a></h1>
<p>Any of these commands may be specified with any mixture of upper-case and
lower-case letters, and non-alphabetic characters (such as '-') may be omitted.</p>
<p>Many of these commands accept a <em>range</em> argument.  A <em>range</em> is a pair of
colon-separated numbers.  Such a <em>range</em> addresses all items whose index in the
song queue is both greater than or equal to the first number and less than the
second number.  For example, &quot;3:7&quot; addresses items 3, 4, 5, and 6.  If the first
number in the pair is omitted, then the <em>range</em> starts at the beginning of the
song queue.  If the second number in the pair is omitted, then the <em>range</em>
extends to include the last item in the song queue.  A <em>range</em> can also be a
single number (with no colon), in which case it addresses the single item whose
index is that of the given number.  Negative numbers may be used to index items
from the end of the list instead of the beginning.  Thus, -1 refers to the last
item in the song queue, -2 refers to the second-to-last item, etc.</p>
<p>Beware that a negative number that immediately follows a moosic <em>command</em> is
liable to be incorrectly interpreted as an option, so option processing should
be explicitly terminated with an argument of &quot;--&quot; between the <em>command</em> and the
number.  This is illustrated by the following example, which removes the last
item in the queue: <code>moosic del -- -1</code></p>
<p>Alternatively (and perhaps more conveniently), you can prevent negative numbers
from being interpreted as options by preceding the range with a single character
that can't be mistaken for a number or an option (i.e. any character that isn't
a digit or a dash).  Example: <code>moosic list /-15:-9</code>.  You can also place such a
character at the end of the range if you think it makes it look prettier.
Example: <code>moosic list /-15:-9/</code>.  The bracketing characters surrounding a range
need not be the same: <code>moosic shuffle '[-13:8]'</code>.  Notice how the preceding
example surrounded the range in quotes to prevent the shell from treating the
&quot;[&quot; and &quot;]&quot; characters specially (since shells have a habit of doing things like
that).</p>
<p>
</p>
<h2><a name="querying_for_information">Querying for information</a></h2>
<p>These commands print useful bits of information to standard output.</p>
<dl>
<dt><strong><a name="help_command" class="item"><strong>help</strong> [<em>command</em> ...]</a></strong></dt>

<dd>
<p>Prints a brief description of the moosic commands named as arguments.  If no
arguments are given, a list of all the available moosic commands is printed.</p>
</dd>
<dt><strong><a name="current" class="item"><strong>current</strong></a></strong></dt>

<dd>
<p>Print the name of the song that is currently playing.</p>
</dd>
<dt><strong><a name="curr" class="item"><strong>curr</strong></a></strong></dt>

<dd>
<p>An alias for &quot;current&quot;.</p>
</dd>
<dt><strong><a name="current_time_format" class="item"><strong>current-time</strong> [<em>format</em>]</a></strong></dt>

<dd>
<p>Print the amount of time that the current song has been playing.  By default,
this time is printed in a format of &quot;hours:minutes:seconds&quot;, but if a different
format is desired, a string argument can be given to specify it.  The format
should be a string that is appropriate for passing to the <code>strftime(3)</code> function.</p>
</dd>
<dt><strong><a name="list_range" class="item"><strong>list</strong> [<em>range</em>]</a></strong></dt>

<dd>
<p>Print the list of items in the current song queue.  A whole number is printed
before each item in the list, indicating its position in the queue.  If a range
is specified, only the items that fall within that range are listed.  Remember
that the song queue does not contain the currently playing song.</p>
</dd>
<dt><strong><a name="plainlist_range" class="item"><strong>plainlist</strong> [<em>range</em>]</a></strong></dt>

<dd>
<p>Print the current song queue without numbering each line.  If a range is
specified, only the items that fall within that range are listed.  This output
is suitable for saving to a file which can be reloaded by the &quot;pl-append&quot;,
&quot;pl-prepend&quot;, &quot;pl-insert&quot;, and &quot;pl-mixin&quot; commands.</p>
</dd>
<dt><strong><a name="history_number" class="item"><strong>history</strong> [<em>number</em>]</a></strong></dt>

<dd>
<p>Print a list of items that were recently played.  The times mentioned in the
output of this command represents the time that a song finished playing.  If a
number is specified, then no more than that number of entries will be printed.
If a number is not specified, then the entire history is printed.  Note that
<strong>moosicd</strong> limits the number of items stored in its history list.</p>
</dd>
<dt><strong><a name="hist_number" class="item"><strong>hist</strong> [<em>number</em>]</a></strong></dt>

<dd>
<p>An alias for &quot;history&quot;.</p>
</dd>
<dt><strong><a name="state" class="item"><strong>state</strong></a></strong></dt>

<dd>
<p>Print the current state of the music daemon.</p>
</dd>
<dt><strong><a name="status" class="item"><strong>status</strong></a></strong></dt>

<dd>
<p>An alias for &quot;state&quot;.</p>
</dd>
<dt><strong><a name="length" class="item"><strong>length</strong></a></strong></dt>

<dd>
<p>Print the number of items in the queue.</p>
</dd>
<dt><strong><a name="len" class="item"><strong>len</strong></a></strong></dt>

<dd>
<p>An alias for &quot;length&quot;.</p>
</dd>
<dt><strong><a name="ispaused" class="item"><strong>ispaused</strong></a></strong></dt>

<dd>
<p>Show whether the current song is paused or not. If the song is paused, &quot;True&quot; is
printed and <strong>moosic</strong> returns normally. If the song is not paused, &quot;False&quot; is
printed and <strong>moosic</strong> returns with a non-zero exit status (which happens to be 2
for no particular reason).</p>
</dd>
<dt><strong><a name="islooping" class="item"><strong>islooping</strong></a></strong></dt>

<dd>
<p>Show whether the server is in loop mode. If the server is in loop mode, &quot;True&quot;
is printed and <strong>moosic</strong> returns normally. If not, &quot;False&quot; is printed and
<strong>moosic</strong> returns with a non-zero exit status (which happens to be 2 for no
particular reason).</p>
</dd>
<dt><strong><a name="isadvancing" class="item"><strong>isadvancing</strong></a></strong></dt>

<dd>
<p>Show whether the server is advancing through the song queue. If the server is
advancing, &quot;True&quot; is printed and <strong>moosic</strong> returns normally. If not, &quot;False&quot; is
printed and <strong>moosic</strong> returns with a non-zero exit status (which happens to be 2
for no particular reason).</p>
</dd>
<dt><strong><a name="version" class="item"><strong>version</strong></a></strong></dt>

<dd>
<p>Print version information for both the client and the server, and then exit.</p>
</dd>
</dl>
<p>
</p>
<h2><a name="adding_to_the_song_queue">Adding to the song queue</a></h2>
<p>These commands will add to the queue of items to be played.  Many of these
commands accept a <em>filelist</em> argument.  A <em>filelist</em> is a list of one or more
files or directories.  Any directories named in the list will be replaced by a
list of files produced by recursively traversing the contents of the directory
(unless the <strong>--no-file-munge</strong> option or <strong>--no-recurse</strong> option is being used).
Depending on the shuffling options specified when invoking <strong>moosic</strong>, the list
will be shuffled before being added to the Moosic server's queue.</p>
<dl>
<dt><strong><a name="append_filelist" class="item"><strong>append</strong> <em>filelist</em></a></strong></dt>

<dd>
<p>Add the files to be played to the end of the song queue.</p>
</dd>
<dt><strong><a name="add_filelist" class="item"><strong>add</strong> <em>filelist</em></a></strong></dt>

<dd>
<p>An alias for &quot;append&quot;.</p>
</dd>
<dt><strong><a name="pl_append_playlist_file" class="item"><strong>pl-append</strong> <em>playlist-file</em> ...</a></strong></dt>

<dd>
<p>Add the items listed in the given playlist files to the end of the song queue.
If &quot;-&quot; (a single dash) is given as the name of a playlist file, data will be
read from from standard input instead of trying to read from a file named &quot;-&quot;.</p>
</dd>
<dt><strong><a name="pl_add_playlist_file" class="item"><strong>pl-add</strong> <em>playlist-file</em> ...</a></strong></dt>

<dd>
<p>An alias for &quot;pl-append&quot;.</p>
</dd>
<dt><strong><a name="prepend_filelist" class="item"><strong>prepend</strong> <em>filelist</em></a></strong></dt>

<dd>
<p>Add the files to be played to the beginning of the song queue.</p>
</dd>
<dt><strong><a name="pre_filelist" class="item"><strong>pre</strong> <em>filelist</em></a></strong></dt>

<dd>
<p>An alias for &quot;prepend&quot;.</p>
</dd>
<dt><strong><a name="pl_prepend_playlist_file" class="item"><strong>pl-prepend</strong> <em>playlist-file</em> ...</a></strong></dt>

<dd>
<p>Add the items listed in the given playlist files to the beginning of the song
queue.  If &quot;-&quot; (a single dash) is given as the name of a playlist file, data
will be read from from standard input instead of trying to read from a file
named &quot;-&quot;.</p>
</dd>
<dt><strong><a name="mixin_filelist" class="item"><strong>mixin</strong> <em>filelist</em></a></strong></dt>

<dd>
<p>Add the files to the song queue and reshuffle the entire song queue.</p>
</dd>
<dt><strong><a name="pl_mixin_playlist_file" class="item"><strong>pl-mixin</strong> <em>playlist-file</em> ...</a></strong></dt>

<dd>
<p>Add the items listed in the given playlist files to the song queue and reshuffle
the entire song queue.  If &quot;-&quot; (a single dash) is given as the name of a
playlist file, data will be read from from standard input instead of trying to
read from a file named &quot;-&quot;.</p>
</dd>
<dt><strong><a name="replace_filelist" class="item"><strong>replace</strong> <em>filelist</em></a></strong></dt>

<dd>
<p>Replace the current contents of the song queue with the songs contained in the
filelist.</p>
</dd>
<dt><strong><a name="pl_replace_playlist_file" class="item"><strong>pl-replace</strong> <em>playlist-file</em> ...</a></strong></dt>

<dd>
<p>Replace the current contents of the song queue with the songs named in the given
playlists.</p>
</dd>
<dt><strong><a name="insert_filelist_index" class="item"><strong>insert</strong> <em>filelist</em> <em>index</em></a></strong></dt>

<dd>
<p>Insert the given items at a given point in the song queue.  The items are
inserted such that they will precede the item that previously occupied the
specified index.</p>
</dd>
<dt><strong><a name="pl_insert_playlist_file_index" class="item"><strong>pl-insert</strong> <em>playlist-file</em> ... <em>index</em></a></strong></dt>

<dd>
<p>Insert the items specified in the given playlist files at a specified point in
the song queue.  If &quot;-&quot; (a single dash) is given as the name of a playlist file,
data will be read from from standard input instead of trying to read from a file
named &quot;-&quot;.</p>
</dd>
<dt><strong><a name="putback" class="item"><strong>putback</strong></a></strong></dt>

<dd>
<p>Reinsert the current song at the start of the song queue.</p>
</dd>
<dt><strong><a name="stagger_add_filelist" class="item"><strong>stagger-add</strong> <em>filelist</em></a></strong></dt>

<dd>
<p>Adds the file list to the end of the song queue, but only after rearranging it
into a &quot;staggered&quot; order.  This staggered order is very similar the order created
by the <strong>stagger</strong> command (described below).  Each element of the file list
(before replacing directories with their contents) specifies a category into
which the expanded file list will be divided.  The staggered order of the list
being added is formed by taking the first item from each category in turn until
all the categories are empty.  This may be a bit difficult to understand without
an example, so here is a typical case:</p>
<p>Initially, the queue contains a few items.</p>
<pre>
    [0] /music/a.ogg
    [1] /music/b.mp3
    [2] /music/c.mid</pre>
<p>Additionally, there are two directories that each contain a few files:</p>
<pre>
    $ ls /music/X/ /music/Y/
    X:
    1.ogg  2.ogg  3.ogg</pre>
<pre>
    Y:
    1.ogg  2.ogg  3.ogg  4.ogg</pre>
<p>After executing <code>moosic -o stagger-add /music/Y /music/X</code>, the queue now
contains:</p>
<pre>
    [0] /music/a.ogg
    [1] /music/b.mp3
    [2] /music/c.mid
    [3] /music/Y/1.ogg
    [4] /music/X/1.ogg
    [5] /music/Y/2.ogg
    [6] /music/X/2.ogg
    [7] /music/Y/3.ogg
    [8] /music/X/3.ogg
    [9] /music/Y/4.ogg</pre>
</dd>
<dt><strong><a name="stagger_merge_filelist" class="item"><strong>stagger-merge</strong> <em>filelist</em></a></strong></dt>

<dd>
<p>Adds the given file list to the queue in an interleaved fashion.  More
specifically, the new song queue will consist of a list that alternates between
the items from the given file list and the items from the existing song queu.
For example, if the queue initially contains:</p>
<pre>
    [0] /music/a.ogg
    [1] /music/b.mp3
    [2] /music/c.mid</pre>
<p>And the <em class="file">/music/Y/</em> directory contains:</p>
<pre>
    1.ogg  2.ogg  3.ogg  4.ogg</pre>
<p>Then, after executing <code>moosic -o stagger-merge /music/Y</code>, the queue will
contain:</p>
<pre>
    [0] /music/Y/1.ogg
    [1] /music/a.ogg
    [2] /music/Y/2.ogg
    [3] /music/b.mp3
    [4] /music/Y/3.ogg
    [5] /music/c.mid
    [6] /music/Y/4.ogg</pre>
</dd>
<dt><strong><a name="interval_add_interval_filelist" class="item"><strong>interval-add</strong> <em>interval</em> <em>filelist</em></a></strong></dt>

<dd>
<p>Inserts the given songs into the current song queue with a regular frequency
that is specified with the given <em>interval</em> argument (which must be an
integer).</p>
<p>For example, if the queue initially contains:</p>
<pre>
    [0] /music/a.mod
    [1] /music/b.mod
    [2] /music/c.mod
    [3] /music/d.mod
    [4] /music/e.mod
    [5] /music/f.mod
    [6] /music/g.mod</pre>
<p>And the <em class="file">/music/Z</em> directory contains:</p>
<pre>
    aleph.wav  bet.wav  gimmel.wav</pre>
<p>Then, after executing <code>moosic -o interval-add 3 /music/Z</code>, the queue will
contain:</p>
<pre>
    [0] aleph.wav
    [1] /music/a.mod
    [2] /music/b.mod
    [3] bet.wav
    [4] /music/c.mod
    [5] /music/d.mod
    [6] gimmel.wav
    [7] /music/e.mod
    [8] /music/f.mod
    [9] /music/g.mod</pre>
</dd>
</dl>
<p>
</p>
<h2><a name="removing_from_the_song_queue">Removing from the song queue</a></h2>
<p>These commands will remove from the queue of items to be played.</p>
<dl>
<dt><strong><a name="cut_range" class="item"><strong>cut</strong> <em>range</em></a></strong></dt>

<dd>
<p>Removes all song queue items that fall within the given range.</p>
</dd>
<dt><strong><a name="del_range" class="item"><strong>del</strong> <em>range</em></a></strong></dt>

<dd>
<p>An alias for &quot;cut&quot;.</p>
</dd>
<dt><strong><a name="crop_range" class="item"><strong>crop</strong> <em>range</em></a></strong></dt>

<dd>
<p>Removes all song queue items that do not fall within the given range.</p>
</dd>
<dt><strong><a name="remove_regex" class="item"><strong>remove</strong> <em>regex</em> ...</a></strong></dt>

<dd>
<p>Remove all song queue items that match the given regular expression.  If multiple
regular expressions are given, any song that matches any one of the expressions
will be removed.</p>
</dd>
<dt><strong><a name="filter_regex" class="item"><strong>filter</strong> <em>regex</em> ...</a></strong></dt>

<dd>
<p>Remove all song queue items that do not match the given regular expression.  If
multiple regular expressions are given, only those songs that match all the
regular expressions will remain afterward.</p>
</dd>
<dt><strong><a name="clear" class="item"><strong>clear</strong></a></strong></dt>

<dd>
<p>Clear the song queue.</p>
</dd>
<dt><strong><a name="wipe" class="item"><strong>wipe</strong></a></strong></dt>

<dd>
<p>Clear the song queue and stop the current song.</p>
</dd>
</dl>
<p>
</p>
<h2><a name="rearranging_the_song_queue">Rearranging the song queue</a></h2>
<p>These commands let you change the order of the items in the queue.</p>
<dl>
<dt><strong><a name="move_range_index" class="item"><strong>move</strong> <em>range</em> <em>index</em></a></strong></dt>

<dd>
<p>Moves all items in the given range to a new position in the song queue.
If you want to move items to the end of the queue, use <code>`moosic length`</code> as the
final argument.  For example, to move the first 10 songs to the end of the
queue, use the following command: <code>moosic move 0:10 `moosic length`</code></p>
</dd>
<dt><strong><a name="move_pattern_regex_index" class="item"><strong>move-pattern</strong> <em>regex</em> <em>index</em></a></strong></dt>

<dd>
<p>Moves all items that match the given regular expression to a new position in
the song queue.</p>
</dd>
<dt><strong><a name="swap_range_range" class="item"><strong>swap</strong> <em>range</em> <em>range</em></a></strong></dt>

<dd>
<p>Causes the songs contained within the two specified ranges to trade places.</p>
</dd>
<dt><strong><a name="reshuffle_range" class="item"><strong>reshuffle</strong> [<em>range</em>]</a></strong></dt>

<dd>
<p>Reshuffle the song queue.  If a range is specified, only items that fall within
that range will be shuffled.</p>
</dd>
<dt><strong><a name="shuffle_range" class="item"><strong>shuffle</strong> [<em>range</em>]</a></strong></dt>

<dd>
<p>An alias for &quot;reshuffle&quot;.</p>
</dd>
<dt><strong><a name="sort_range" class="item"><strong>sort</strong> [<em>range</em>]</a></strong></dt>

<dd>
<p>Rearrange the song queue in sorted order.  If a range is specified, only items
that fall within that range will be sorted.</p>
</dd>
<dt><strong><a name="reverse_range" class="item"><strong>reverse</strong> [<em>range</em>]</a></strong></dt>

<dd>
<p>Reverse the order of the song queue.  If a range is specified, only items that
fall within that range will be reversed.</p>
</dd>
<dt><strong><a name="partial_sort_regex" class="item"><strong>partial-sort</strong> <em>regex</em> ...</a></strong></dt>

<dd>
<p>For each specified regular expression, the items in the song queue that match
that expression are removed from the queue and gathered into their own list.
All of these lists (plus the list of items that did not match any regular
expression) are then stitched back together through simple concatenation.
Finally, this unified list replaces the contents of the song queue.</p>
<p>The items that match a particular regular expression will remain in the same
order with respect to each other.  Each group of matched items will appear in
the reordered song queue in the order that the corresponding regular
expressions were specified on the command line.</p>
</dd>
<dt><strong><a name="stagger_regex" class="item"><strong>stagger</strong> <em>regex</em> ...</a></strong></dt>

<dd>
<p>For each specified regular expression, the items in the song queue that match
that expression are removed from the queue and gathered into their own list.
All of these lists are then merged together in a staggered fashion. All the
leftover items (i.e. the ones that weren't matched by any regex on the command
line) are appended to this unified list, which then replaces the contents of the
song queue.</p>
<p>For example, if you use <code>moosic stagger red blue green</code> and the queue
originally contains only names that either contain the string &quot;red&quot; or &quot;blue&quot; or
&quot;green&quot;, then the members of the reordered queue will alternate between &quot;red&quot;
items, &quot;blue&quot; items, and &quot;green&quot; items.  If the queue does contain items that
are neither &quot;red&quot; nor &quot;green&quot; nor &quot;blue&quot;, then these will be collected and
placed at the end of the queue, after all the &quot;red&quot;, &quot;green&quot;, and &quot;blue&quot; items.</p>
</dd>
<dt><strong><a name="sub_pattern_replacement_range" class="item"><strong>sub</strong> <em>pattern</em> <em>replacement</em> [<em>range</em>]</a></strong></dt>

<dd>
<p>Perform a regular expression substitution on all items in the song queue.  More
precisely, this searches each queue item for the regular expression specified by
the first argument, and replaces it with the text specified by the second
argument.  Any backslash escapes in the replacement text will be processed,
including special character translation (e.g. &quot;\n&quot; to newline) and
backreferences to groups within the match.  If a range is given, then the
substitution will only be applied to the items that fall within the range,
instead of all items.  Only the first matching occurrence of the pattern is
replaced in each item.</p>
</dd>
<dt><strong><a name="suball_pattern_replacement_range" class="item"><strong>suball</strong> <em>pattern</em> <em>replacement</em> [<em>range</em>]</a></strong></dt>

<dd>
<p>This is identical to the &quot;sub&quot; command, except that all occurrences of the
pattern within each queue item are replaced instead of just the first
occurrence.</p>
</dd>
</dl>
<p>
</p>
<h2><a name="general_management">General management</a></h2>
<p>These commands affect the state of the Moosic server in various ways.</p>
<dl>
<dt><strong><a name="next_number" class="item"><strong>next</strong> [<em>number</em>]</a></strong></dt>

<dd>
<p>Stops the current song (if any), and jumps ahead to a song that is currently in
the queue.  The argument specifies the number of songs to be skipped, including
the currently playing song.  Its default value is 1.  The skipped songs are
recorded in the history as if they had been played.  If queue advancement is
disabled, this command merely stops the current song and removes the appropriate
number of songs from the queue, and does not cause a new song to be played.</p>
</dd>
<dt><strong><a name="previous_number" class="item"><strong>previous</strong> [<em>number</em>]</a></strong></dt>

<dd>
<p>Retreats to a previously played song (from the history list) and begins playing
it if queue advancement is enabled.  If a number is given as an argument, then
the music daemon will retreat by that number of songs.  If no argument is given,
then the music daemon will retreat to the most recent song in the history.  More
precisely, this command stops the current song (without recording it in the song
history) and returns the most recently played song or songs to the queue.  This
command removes songs from the history when it returns them to the queue, thus
modifying the song history.</p>
<p>When loop mode is on, this command retreats into the tail end of the queue
instead of the song history.  This produces wrap-around behavior that you would
expect from loop mode, and does not modify the song history.</p>
</dd>
<dt><strong><a name="prev" class="item"><strong>prev</strong></a></strong></dt>

<dd>
<p>An alias for &quot;previous&quot;.</p>
</dd>
<dt><strong><a name="goto_regex" class="item"><strong>goto</strong> <em>regex</em></a></strong></dt>

<dd>
<p>Jumps to the next song in the queue that matches the given regular expression.</p>
</dd>
<dt><strong><a name="gobackto_regex" class="item"><strong>gobackto</strong> <em>regex</em></a></strong></dt>

<dd>
<p>Jumps back to the most recent previous song that matches the given regular
expression.</p>
</dd>
<dt><strong><a name="noadvance" class="item"><strong>noadvance</strong></a></strong></dt>

<dd>
<p>Tell the music daemon to stop playing any new songs, but without interrupting
the current song.  In other words, this halts queue advancement.</p>
</dd>
<dt><strong><a name="noadv" class="item"><strong>noadv</strong></a></strong></dt>

<dd>
<p>An alias for &quot;noadvance&quot;.</p>
</dd>
<dt><strong><a name="advance" class="item"><strong>advance</strong></a></strong></dt>

<dd>
<p>Tell the music daemon to resume queue advancement (i.e. play new songs when the
current one is finished).  Obviously, this has no effect if queue advancement
hasn't been disabled.</p>
</dd>
<dt><strong><a name="adv" class="item"><strong>adv</strong></a></strong></dt>

<dd>
<p>An alias for &quot;advance&quot;.</p>
</dd>
<dt><strong><a name="toggle_advance" class="item"><strong>toggle-advance</strong></a></strong></dt>

<dd>
<p>Halts queue advancement if it is enabled, and enables advancement if it is
halted.</p>
</dd>
<dt><strong><a name="stop" class="item"><strong>stop</strong></a></strong></dt>

<dd>
<p>Tell the music daemon to stop playing the current song and stop processing the
song queue.  The current song is put back into the song queue and is not
recorded in the song history.</p>
</dd>
<dt><strong><a name="pause" class="item"><strong>pause</strong></a></strong></dt>

<dd>
<p>Suspend the current song so that it can be resumed at the exact same point at a
later time.  Note: this often leaves the sound device locked.</p>
</dd>
<dt><strong><a name="unpause" class="item"><strong>unpause</strong></a></strong></dt>

<dd>
<p>Unpause the current song, if the current song is paused, otherwise do nothing.</p>
</dd>
<dt><strong><a name="play" class="item"><strong>play</strong></a></strong></dt>

<dd>
<p>Tell the music daemon to resume playing.  (Use after &quot;stop&quot;, &quot;noadv&quot;, or
&quot;pause&quot;.)</p>
</dd>
<dt><strong><a name="loop" class="item"><strong>loop</strong></a></strong></dt>

<dd>
<p>Turn loop mode on.  When loop mode is on, songs are returned to the end of the
queue when they finish playing instead of being thrown away.</p>
</dd>
<dt><strong><a name="noloop" class="item"><strong>noloop</strong></a></strong></dt>

<dd>
<p>Turn loop mode off.</p>
</dd>
<dt><strong><a name="toggle_loop" class="item"><strong>toggle-loop</strong></a></strong></dt>

<dd>
<p>Turn loop mode on if it is off, and turn it off if it is on.</p>
</dd>
<dt><strong><a name="reconfigure" class="item"><strong>reconfigure</strong></a></strong></dt>

<dd>
<p>Tell the music daemon to reload its configuration file.</p>
</dd>
<dt><strong><a name="reconfig" class="item"><strong>reconfig</strong></a></strong></dt>

<dd>
<p>An alias for &quot;reconfigure&quot;.</p>
</dd>
<dt><strong><a name="showconfig" class="item"><strong>showconfig</strong></a></strong></dt>

<dd>
<p>Query and print the music daemon's filetype associations.</p>
</dd>
<dt><strong><a name="start_server_options" class="item"><strong>start-server</strong> [<em>options</em>]</a></strong></dt>

<dd>
<p>Start a new instance of the music daemon (also known as <strong>moosicd</strong>).  If option
arguments are given, they will be used as the options for invoking <strong>moosicd</strong>.
The options that are accepted by <strong>moosicd</strong> can be found in its own manual page,
<a href="././moosicd.html">the moosicd manpage</a>(1).</p>
</dd>
<dt><strong><a name="exit" class="item"><strong>exit</strong></a></strong></dt>

<dd>
<p>Tell the music daemon to quit.</p>
</dd>
<dt><strong><a name="quit" class="item"><strong>quit</strong></a></strong></dt>

<dd>
<p>An alias for &quot;exit&quot;.</p>
</dd>
<dt><strong><a name="die" class="item"><strong>die</strong></a></strong></dt>

<dd>
<p>An alias for &quot;exit&quot;.</p>
</dd>
</dl>
<p>
</p>
<hr />
<h1><a name="audio_cd_support">AUDIO CD SUPPORT</a></h1>
<p>If you have the takcd program installed, and you have an appropriate entry for
it in the Moosic server's player configuration, then you can play audio CD
tracks with Moosic.  The following entry should be in <em class="file">~/.moosic/config</em>:</p>
<pre>
    (?i)^cda://(\S*)
    takcd \1</pre>
<p>To put CD tracks into the song queue, you should name them with the prefix
&quot;cda://&quot;, followed immediately by the number of the track you wish to play.  For
example, <code>moosic -n add cda://3</code> will add the third track on the CD to the end
of the song queue.</p>
<p>The takcd program can be found at <a href="http://bard.sytes.net/takcd/">http://bard.sytes.net/takcd/</a>.</p>
<p>
</p>
<hr />
<h1><a name="files">FILES</a></h1>
<dl>
<dt><strong><a name="socket" class="item"><em class="file">socket</em></a></strong></dt>

<dd>
<p>This is a socket file which is used to allow Moosic clients to contact the
Moosic server.  It is generally located in the <em>~/.moosic/</em> directory, unless
<strong>moosicd</strong> was invoked with the <strong>-c</strong>/<strong>--config</strong> option.</p>
</dd>
</dl>
<p>
</p>
<hr />
<h1><a name="see_also">SEE ALSO</a></h1>
<p><a href="././moosicd.html">the moosicd manpage</a>(1), for details on invoking the Moosic server by hand.</p>
<p>Various <strong>moosic</strong> commands accept regular expressions arguments.  The syntax
used for these regular expressions is identical to the syntax used by Python's
regular expression library.  The details of this syntax are explained in the
chapter entitled &quot;Regular Expression Syntax&quot;
<a href="http://www.python.org/doc/current/lib/re-syntax.html">http://www.python.org/doc/current/lib/re-syntax.html</a> from the section dealing
with the <strong>re</strong> module in the <em>Python Library Reference</em>.</p>
<p>
</p>
<hr />
<h1><a name="author">AUTHOR</a></h1>
<p>Daniel Pearson &lt;<a href="mailto:daniel@nanoo.org">daniel@nanoo.org</a>&gt;</p>

</body>

</html>