Blog of Leonid Mamchenkov

You just stepped in a pile of posts.

webby_m3u

Posted in All on February 10th, 2005 · 2 Comments

Today I have found a really nice way to listen to my home mp3s at work. All I needed to do is share my music directory via web and generate an m3u playlist with URLs to files. m3u playlist than could be downloaded and fed to XMMS, where I could select songs to play. It is also nice to use random playback until I find something I am in the mood for and than switch to sequential mode.

Anyway, I wrote a small Perl script to generate an m3u playlist. It dives into some directory recursively and correctly escapes all the URLs. Check the few configuration variables in the beginning of the file.

webby_m3u.perl

Tags: , , , ,

2 responses so far ↓

  • 1 Qiang // Nov 16, 2005 at 7:58 pm

    wondering why not using File::Find for the recursive part. or u just want to excersie your brain a little :)

  • 2 Leonid Mamchenkov // Nov 16, 2005 at 8:53 pm

    Qiang,

    I just love the recursion. If it was up to me, I’d rewrite it over and over again :)

    Also, File::Find has one of the wierdist interfaces I came across. I just don’t like it. I need to read the manual and figure it out every time I have to use it. Maybe it’s just the way my brain works…

Leave a Comment

Note: This post is over 3 years old. You may want to check later in this blog to see if there is new information relevant to your comment.