I am an Artist, so of course I want to open different files based on the weather. ;-)

While I am learning Perl (one project a time) I have no idea how to fit my information into a whole working thing and pull off what conceptually seems like the right tool for the right job. So far I have been learning and using perl on my website server apps, (running a wiki) called by http. This is all backwards for me now.

I want to use Perl on my Mac OS X machine to create a script that periodically checks an url and then opens and runs different interactive patches I've made in one of my local applications; suffice to call them movies. My hope is the machine will perpetually check a webpage, find the weather, and open movies with the corresponding filename, every 7 minutes.

I want to make the changing weather info at page at http://www.weather.com/weather/local/12986? open "Partly Sunny.mov" when it's "Partly Sunny" on the page, or "Windy.mov" when it's "Windy", and "Thunderstorm.mov" when it's "Thunderstorms" on the page. etc.

Since I also need to distinguish between Sunny, Calm, Windy, Raining, Thunder+Lightning and also the time of day. I figure i will be making a set of different weather files for morning, day, dusk, and night. So it figures I will need some kind of MORNINGmap, DAYmap, DUSKmap, NIGHTmap, hash-array-tablething to map the time onto the weather onto the files to play.

I notice this weather page has a nice <B CLASS=obsTextA>Cloudy</B> structure surrounding my target info. I looked for more plaintext weather data and couldn't locate anything like an http: sms server.

I have explored some related ideas a bit, and there's a mac osX tool called Automator, that can hand a webpage as input to PERL. I couldn't make it do much yet, but maybe this will be useful on my path.

This seems like a big challenge to me right now, but I am hoping someone who understands PERL can show me how simple it is and put me on a clearer path.
Any suggestions are welcome. --- --just

In reply to Checking the Weather by rand0mmm

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.