.\" Copyright (c) 2016 Joost van Baal-Ilić .TH "draai" 1 "22 дец 2016" "draai 20180520" "USER COMMANDS " .po 2m .de ZI .\" Zoem Indent/Itemize macro I. .br 'in +\\$1 .nr xa 0 .nr xa -\\$1 .nr xb \\$1 .nr xb -\\w'\\$2' \h'|\\n(xau'\\$2\h'\\n(xbu'\\ .. .de ZJ .br .\" Zoem Indent/Itemize macro II. 'in +\\$1 'in +\\$2 .nr xa 0 .nr xa -\\$2 .nr xa -\\w'\\$3' .nr xb \\$2 \h'|\\n(xau'\\$3\h'\\n(xbu'\\ .. .if n .ll -2m .am SH .ie n .in 4m .el .in 8m .. .SH NAME draai \- manage playlists and play audio files .SH SYNOPSIS draai [option [option \&.\&.\&.]] command [track [track \&.\&.\&.] | tracknumber [tracknumber \&.\&.\&.]] .SH DESCRIPTION Draai is a wrapper around mpc, making playing music from the commandline more enjoyable\&. mpc is a client for MPD, the Music Player Daemon\&. Using draai, one can play an audiofile (ogg, mp3, flac, whatever your MPD offers), play all files in a predefined playlist, view details on current, past and future playing songs, skip to the next song, etc\&. .SH GETTING STARTED Run "draai init" to get started using draai the way the author likes it\&. Then, open another terminal window and run e\&.g\&. $ draai listall | dr_permutate | draai add; draai play to build a current playlist and start playing it\&. Other ways of using draai are possible, see below\&. .SH COMMANDS .ZI 2m "draai" \& .br Play music: the files given as args and playlists passed via --playlist\&. .in -2m .ZI 2m "watch" \& .br Run watch(1) on "draai peek"\&. .in -2m .ZI 2m "init" \& .br Start a bunch of X terminals setting up some draai jobs: tail, logtail, watch, syslog, \&.\&.\&. .in -2m .ZI 2m "guestlist" \& .br Reschedule listed tracknumbers as upcoming tracks\&. Last arguments should be the positions of tracks to be put on the guestlist, not filenames\&. .in -2m .ZI 2m "unguestlist" \& .br Reschedule listed tracknumbers to end of playlist\&. .in -2m .ZI 2m "insert" \& .br Add file(s) (given either as args or on stdin) to playlist and schedule it as upcoming track\&. You probably want to have \&'draai insert\&' read from a pipe fed by \&'draai search\&'\&. .in -2m .ZI 2m "move" \& .br Move tracknumber to tracknumber given as last argument\&. .in -2m .ZI 2m "zap" \& .br Move tracknumber to position one and immediately start playing it\&. Typically used to deal with radiostations in playlist\&. .in -2m .ZI 2m "search" \& .br Search for substrings in all song tag types (artist, title, comment, filename, \&.\&.\&.)\&. Similar to \&'mpc search any \&'\&. You\&'ll typically want to pipe this commands output to e\&.g\&. \&'draai insert\&'\&. .in -2m .ZI 2m "tail" \& .br Print information about track when it starts playing, similar to tail -f on a logfile\&. .in -2m .ZI 2m "logtail" \& .br Run tail(1) on system log file\&. .in -2m .ZI 2m "list" \& .br List current playlist\&. .in -2m .ZI 2m "peek" \& .br Show status of current song, and show upcoming $peek FIXME tracks\&. .in -2m .ZI 2m "play" \& .br Play music\&. .in -2m .ZI 2m "syslog" \& .br Send raw information from tail to syslog\&. You likely want to run "draai syslog" in the background\&. .in -2m .ZI 2m "skip" \& .br Skip this track, start playing the next one now\&. .in -2m .ZI 2m "osjittisstil" \& .br Run this if unwanted silence pops up during a playing session (for now, it runs draai --sloppy skip)\&. .in -2m .ZI 2m "delete" \& .br Delete track(s) from current playlist\&. Last arguments should be _positions_ of tracks to be removed, not filename\&. If no position is given, deletes upcoming track from playlist\&. .in -2m .ZI 2m "fastforward" \& .br Seek forward in current track\&. .in -2m .ZI 2m "crescendo" \& .br Play louder\&. .in -2m .ZI 2m "diminuendo" \& .br Play softer\&. .in -2m .ZI 2m "shuffle" \& .br Shuffle the playlist\&. By default, this task is delegated to dr_unsort(1)\&. However, if draai runs in "sloppy" or in "native shuffle" mode, then mpc native shuffling is done (by calling "mpc shuffle")\&. Draai runs in "sloppy" mode when the DR_SLOPPY environment variable is set, or when the --sloppy option is passed\&. Draai runs in "native shuffle" mode when the DR_SHUFFLE_NATIVE environment variable is set\&. .in -2m .ZI 2m "listall" \& .br List all files as served by music database\&. .in -2m .ZI 2m "add" \& .br Add file(s) (given either as args or on stdin) to playlist\&. You probably want to have \&'draai add\&' read from a pipe fed by e\&.g\&. \&'draai listall\&' or \&'draai search\&'\&. .in -2m .ZI 2m "quit" \& .br quit .in -2m .SH OPTIONS .ZI 2m "\fB--debug\fP (\fIdebug\fP), \fB-d\fP" \& .br Be very verbose\&. .in -2m .ZI 2m "\fB--playlist\fP (\fIwith playlistfile\fP), \fB-p\fP" \& .br Playlist file; option can be supplied more than once\&. To be used with command "draai"\&. .in -2m .ZI 2m "\fB--noshuffle\fP (\fIno shuffle\fP), {\fB-S\fP}" \& .br Do not shuffle tracks and leave random mode untouched (default is: do shuffle and disable random mode)\&. See also the script dr_unsort\&. .in -2m .ZI 2m "\fB--raw\fP (\fIraw\fP), \fB-r\fP" \& .br Print raw stuff, suitable for postprocessing (if combined with tail, peek or list)\&. .in -2m .ZI 2m "\fB--sloppy\fP (\fIsloppy\fP), \fB-s\fP" \& .br Do not try hard to make everything sound smooth\&. If combined with skip: risk a squeak on old hardware\&. .in -2m .ZI 2m "\fB--time\fP (\fIwith timespec\fP), \fB-t\fP" \& .br If combined with commands quit or draai: time at which to quit or start\&. .in -2m .SH EXAMPLES Schedule all tracks containing the string \&'delia gone\&' in title, artist, comment or any other tag for playing, after current song has finished: \fCdraai search \&'delia gone\&' | draai insert\fP\&. .SH ENVIRONMENT Run \fCgrep DR_ \&`which draai\&`\fP to find out about environment variables honored by draai\&. It honors: booleans: DR_DEBUG and DR_SHUFFLE, DR_TIMESTAMP, DR_RAW and DR_SLOPPY ; strings: DR_WATCH ; integers: DR_CROSSFADE, DR_PEEK and DR_SEEK as well as DR_FADEOUT_STEP, DR_FADEOUT_REPEAT, and DR_FADEOUT_SLEEP and DR_VOLUME_STEP ; and some more strings: DR_SYSLOG_FILE, DR_SYSLOG_FACILITY and DR_SYSLOG_LEVEL \&. For now, see the draai code for what it all means\&. .SH FILES, CONFIGURATION All configuration variables (see ENVIRONMENT) can be set in \fC~/\&.draai/rc\fP\&. This rc-file is sourced as a shell script\&. If you\&'d like to set the syslog facility, set \fIsyslog_facility\fP (overruled by DR_SYSLOG_FACILITY)\&. If you\&'d like to set the watch programma, set \fIwatch\fP (overruled by DR_WATCH)\&. .SH SEE ALSO Lots of alternatives for draai exist\&. One is "herrie", by Ed Schouten and Martijn van den Dungen, see http://freshmeat\&.net/projects/herrie/\&. .SH COPYRIGHT AND LICENSE Draai is (C) 2000-2013 Joost van Baal-Ilić \&. Draai is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version\&. This program is distributed WITHOUT ANY WARRANTY\&. You should have received a copy of the GNU General Public License along with draai\&. If not, see http://www\&.gnu\&.org/licenses/\&. .SH AUTHOR Joost van Baal-Ilić