Code:
#!/usr/bin/perl
`echo '<HTML><BODY bgcolor=black text=white>' >> playlist.html`;
`echo '<center><h1><u><b>XMMS Playlist</b></u></h1></center>' >> playlist.html`;
foreach $file (`ls /music -R *.mp3`){
if( $file =~ /mp3$/i ){
`echo \"$file <br>\" >> playlist.html`;
}
}
`echo '</BODY></HTML>' >> playlist.html`;
This is a VERY simple perl script. Pretty crude too, but it does the job. This will search your hard disk, starting at the directory /music (change this to your parent music directory) and will output an HTML page called playlist.html with just a title and then every filename listed underneath.
Copy and paste my code into a text file, save it, then do:
chmod +x filename
perl ./filename
to run it. Obviously you need perl installed.
Warning though, if you run this twice it will list all the songs twice, so if you need to run it again, delete the playlist.html file.
Oh yeah, if all your mp3s are in one folder then you can delete the -R from the 'foreach' line, and have the /music bit as your folder.