randomplay 0.60 released

Today I released version 0.60 of randomplay, my command-line shuffle-recall-swiss-army-knife music player. It will never make Winamp users happy, but it’s a good substitution for complex combinations of find/grep/xargs/sort that people sometimes use to pick tracks to play. If you can’t see why you’d use it, you probably don’t need it.

The latest version adds two new command-line options, —older-than and —newer-than. These can be used to limit the songs included in the shuffle on the basis of the file modification date. The syntax is fairly flexible, and resembles that used by rdiff-backup for restoration commands. For example:

Randomly play music under the ~/music directory that were added in the past week:

randomplay --newer-than 1W ~/music

Play in order music that is from before this year:

randomplay --norandom --older-than '1/1/2006'

Give a list of filenames of music that were added in the past 6 months, but haven’t been played in the last three months:

randomplay --names-only --newer-than 6M --days 3M

Play, but don’t record in the playing history, music added in the first three months of 2004:

randomplay --noremember --newer-than '1/1/2004' --older-than '4/1/2004'

Unfortunately, this new feature is pretty slow, because it stats each file individually on the initial spidering of the directories to be played. In fact, the startup is always fairly slow if you are searching a large directory hierarchy, since randomplay does not preserve any file index but checks anew on each execution. If you are searching tens of thousands of tracks over NFS (as I do), this can take a minute or so. Suggestions for improving the perfomance of the file modification time detection or of the whole startup are welcome. At some point, I will probably implement an indexing feature, but I like the simplicity of it now where it works basically like the shell find command.

Version 0.60 should show up in Debian unstable shortly.

A Firefox Extension You Can’t Live Without

At least where “you” is “me.” Search Keys:

Search Keys lets you go to search results by pressing the number of the search result instead of clicking. For example, pressing 1 takes you to the first result. Hold Alt (Windows/Mac) or Ctrl (Linux) to open results in new tabs, or Shift to open results in new windows.

This is a great example of the sort of feature you never even knew existed before, and then you can’t live without.