Options: --help brief help message --man full man page --version show the version number and exit -q, --quiet quiet output: don't report name of each song as it is played -v, --verbose verbose output: include output from player program on console
-d n, --days=n minimum days since track was last played for it to be considered (default 10 days) n can be number of days, or add suffix (W = week, M = month, Y= year), or can be an absolute date -0 special case to ignore history entirely (equivalent to --days=0) --random shuffle track listing (default random) --norandom --remember remember tracks played for future sessions (default remember) --noremember --utf8 use UTF-8 encoding for output (default utf8) --noutf8 -w, --weight weight random shuffle to prefer songs rated as favorites (default weight) --noweight
-r, --regexp=regexp string only play files where filename matches regexp string -n, --names-only don't play tracks, only give list of filenames -t n, --tracks=n how many tracks to play (or display) total (default unlimited) --maxsize=number of bytes maximum number of bytes of music to play or display (default unlimited) --maxtime=duration how long to play before stopping (minutes or hours) (default unlimited) -l n, --last=n play last X songs in same order as they were played before --newer-than n, --newer n only play songs newer than n days old (e.g., W = week, M = month, Y = year, default days) or newer than date n --older-than n, --older n only play songs older than n days old or older than date n
--basedir=directory directory to which all other directory specifications will be relative --history=filename file to use for randomplay history (default ~/.randomplay_history) --clear permanently clear (delete) the history file, start over with new history
--pause=n delay between songs in seconds (default one second) --announce=command program to run to announce each new track track information is piped into program set to a blank string if you don't want any on screen announcements (default is xosd if it is installed) --player extension=command play files with extension with specified command (default mp3=mpg321, ogg=ogg123) --key function=keystroke define alternative keystrokes for player actions (defaults below)
Default keys while playing: h, ? show keystrokes (set with --key help=keystrokes) + increase the currently playing song's random weight (set with --key like=keystrokes) - decrease the currently playing song's random weight (set with --key dislike=keystrokes) 0, = reset the currently playing song's randow weight to 0 (set with --key reset=keystrokes) f skip to the next song (set with --key next=keystrokes) b skip to the previous song (set with --key back=keystrokes) p pause the playback (toggle) (set with --key pause=keystrokes) l quit randomplay after the current song is finished (set with --key quit=keystrokes) q quit randomplay (set with --key last=keystrokes)
randomplay --days=15 --pause=5 --player ogg=ogg123 ~/dir1 ~/dir2 =dir3
Play all ogg, wav, and mp3 files under the current directory (or base directory, if specified in .randomplayrc file) which have not been played for 10 days in alphabetical order, switch the 'skip to next song' keystroke to 'G' or 'g' and 'quit' to 'q' or 'c':
randomplay --norandom --key next=Gg --key quit=qc
Play all files under the current directory with the strings ``frisell'' and ``bill'' in the filename, in any order, (saves having to hunt down a file in a hierarchy), ignore whether the file has been played recently, but stop playing after 15 minutes:
randomplay --regexp 'frisell bill' -0 --maxtime=15m
Display 100M worth of music files, randomly sorted, without recording the history of tracks, using the default music directory (or the current directory if not specified):
randomplay --maxsize=100M --noremember --names-only
Play the last 10 songs played over again:
randomplay --last=10
Play songs test.ogg, test2.ogg, test3.ogg, and all files in musicdir in random order without weighting preferred songs:
randomplay --noweight test.ogg test2.ogg test3.ogg musicdir
Copy 128M of songs into a Neuros Audio Player, using positron:
positron add `randomplay --names-only --maxsize=128M`
Pick a random jpeg or png file that has not been displayed in the last week from the 'images' directory and display it with ImageMagick 'display' command:
randomplay --player jpg=display --player gif=display --days 7 ~/images
For maxsize, you can use ``k'' for kilobytes and ``m'' for megabytes, or just enter the number of bytes.
For maxtime, you can use ``s'' for seconds (default units), ``m'' for minutes, ``h'' for hours, or ``d'' for days.
You might want to specify a ``basedir'' setting in your .randomplayrc, if all your music is under a certain directory. Then you can just give the relative names of the directories on the command line---e.g., you have ``basedir=~/music'' in ~/.randomplayrc, and rock is a directory under ~/music, so just enter ``randomplay rock''.
Randomplay will search for music in specified subdirectories first under the current working directory, and then relative to the basedir setting, if any. If the specified directory name begins with =, it will be searched relative to the basedir setting, even if the specified directory also exists under the current working directory.
Spaces in regexps are turned into ``ands,'' making it more convenient to find the files you want. For example, --regexp 'thelonious monk blues' will play all songs with the words thelonious, monk, and blues in the filename, regardless of the order in which those words occur. Regexp searching is case-insensitive.
If you specify an extension and a player for that extension, either in ~/.randomplayrc or on the command-line, only files with that extension will be played. You can, however, specify multiple players/extensions in either place, and all extensions listed will be played.
The --last option implies --norandom and --noremember.
The system used to kill the music player when you decide to skip to the next track looks up the process IDs using 'ps'; this may not work on all platforms.
The --maxtime option only works if you actually play the songs; it calculates actual time elapsed, rather than totalling the length of the tracks. This may or may not be the behavior you expect.