I rox0r

by vivin

I have some music files on my server that are accessible through http (only by me). So instead of keeping them on my laptop, I decided to add the URL’s to Winamp. But that was too painful. So I took the html files and stripped out the tags (using sed) so that I have the URL’s to the actual files (I use relative paths, but Windows adds the full path to the href attribute in the anchor tag). I wrote that out to a file and then used Vim to create an M3U out of just one regex sub :). Check it out:

:%s/\(http.*\)\(\n\)/#EXTINF:-1,\1\2\1\2/

I just think that is so schweet!