I'm looking to write a perl script (probably on linux) to automatically retrieve entire albums in mp3 format and save them to a disk.

Specifically, I want to do the following:

1. ssh to my linux box running at home
2. perl myscript.pl --bitrate 128 --artist 'beastie boys' --album 'check your head'
(might do #2 with a simple cgi script instead of the command line way)

Bingo, when I come home later I have a new folder in my /albums directory containing all the songs on the album encoded in 128 bitrate. I may want to have the script do some file renaming magic to make things consistent, but that is not necessary for version 1.0 and you get the idea. This, to me, seems like a good job for perl.

- what file sharing software to use? I've poked around a bit and edonkey seems like a good choice because a)it runs on linux and b)it has a published API (they have a java, and other, front-ends that connect with client software running wherever you like). Keep in mind I'd like to do some "fancy" stuff with search results--like get the version of the song "Hey Ladies" that is both encoded at 128 bitrate and being shared by the greatest number of users.

- how to get the song names? Net::CDDBScan? lwp get on Amazon page? something else?

Yes, if it makes you feel better I will do this only for albums I have purchased :-)

Any suggestions on how best to go about this? Better yet, did you already do this?

Phil


In reply to Automated music retrieval script by phildog

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.