Dell DJ and Linux Access

Tim Chase blinux.list at thechases.com
Sat Dec 3 14:30:17 UTC 2005


> File management is probably the single most important part of the
> puzzle with navigation of what you have the second most important 
> part.  I didn't get to really play with the DJ much so I don't know 
> how hard it would be to navigate a bunch of subdirectories after 
> getting them in there.

By exposing the DJ as part of your file-system, you suddenly can use all 
your regular file-system tools for management and navigation.  If 
Midnight Commander is your thing, you can use that.  If you're more of a 
command-line geek like myself, just using things like "mv", "cp", "find" 
and the like can serve your purpose.  There are also some command-line 
tools for manipulating MP3s (reading and editing ID3 tags).  So 
theoretically, you could have two directories:

	/path/to/my/huge/music/archive

and

	/path/to/dj_mountpoint

and could do something like this untested

	bash$ cd /path/to/my/huge/music/archive
	bash$ find . -iname "*.mp3" | xargs mp3info -p '%g %F' {} | grep 
"^Rock" | sed 's/^Rock \(.*\)/cp \1 /path/to/dj_mountpoint' | sh

That second hairy line
1) finds all the mp3 files in your massive archive
2) passes them to mp3info which then prints the genre and full file-path
3) searches for those with the genre of Rock
4) creates a script to copy each of those files to your DJ
5) runs that script

This assumes you have the mp3info tool (http://www.ibiblio.org/mp3info/) 
and that you wanted the Rock files (or easily change it for some other 
genre).  If you wanted all the files by a particular artist, or on a 
particular album, or any of the other piles of ID3 tags, you can do that 
too.

It may be a tad slow, as it has to touch each of your mp3 files to 
determine its ID3 info, but you should just be able to let it crank and 
churn.  And it's a heckuva lot faster than searching them all by hand.

If you wanted to listen to all your 80s music, you could change the %g 
to a %y and then change your grep to look for "^198" and change your sed 
to look for 's/^198. \(.*\)/cp \1 /path/to/dj_mountpoint'

If your dj holds more than your whole mp3 collection, you might just 
want to copy the whole lot over there.

-tim







More information about the Blinux-list mailing list