Let's Make Robots!

Question:- How could the ShoutBox be displayed on a separate Serial LCD screen

I have a simple question and project that may be "Fun" and quite practical for all Avid "SHOUTBOX" user.

It would be real cool to have a separate 2 or 4 line serial LCD next to your compy displaying shoutbox updates .YAY.

Question :- how on earth could i "parse" the LMR webpage ?

                   ......extract the shoutbox data ?

                    ........and display to a serial LCD display ?

The closest i have come is by using a program called LCD smartie ..... that works for Rss channels ...... however the shoutbox is not on Rss ..... don't quote me on that though

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

The ShoutBox block that is in every path but "All Shouts" does a request every 15 seconds (configurable) to this page http://letsmakerobots.com/shoutbox/js/view and returns last n-shouts that are displayed.

A custom program could be built to query the same page and then parse the data using xpath to get the parts to display to the LCD.

 

Here is a small piece of what the page mentioned above returns:

<div class=" shoutbox-msg shoutbox-odd  " title="Posted 03/23/11 at 11:47am by basile">
  <span class="actions"></span>
  <span class="shout">
    <b>
      <a href="/user/14256" class="sb-nick" title="click to view profile">basile</a>
    </b>: do you know what module has Rudolph used? Maybe there lies the solution.
  </span>
</div>
<div class=" shoutbox-msg shoutbox-even  " title="Posted 03/23/11 at 11:40am by Gareth">
  <span class="actions"></span>
  <span class="shout">
    <b>
      <a href="/user/2941" class="sb-nick" title="click to view profile">Gareth</a>
    </b>: Big YAY ...my RBBB prop just landed......
  </span>
</div>

Thanks for the observations, it looks like it just in Grasp.....

If the shout data could be taken apart then it could also be used to control things .... yes our robots..... or better,someone elses robots.   Just like riks darwin project or patricks chess machine .....  the gears are rolling.....

... I keep getting the same content ...

<div class=" shoutbox-msg shoutbox-odd  " title="Posted 03/23/11 at 11:28am by TinHead"><span class="actions"></span> <span class="shout"><b><a href="/user/3886" class="sb-nick" title="click to view profile">TinHead</a></b>: hmmm well python scripting right now </span></div>

<div class=" shoutbox-msg shoutbox-even  " title="Posted 03/23/11 at 11:28am by TinHead"><span class="actions"></span> <span class="shout"><b><a href="/user/3886" class="sb-nick" title="click to view profile">TinHead</a></b>: oh true basile ... seems to work without </span></div>

<div class=" shoutbox-msg shoutbox-odd  " title="Posted 03/23/11 at 11:28am by basile"><span class="actions"></span> <span class="shout"><b><a href="/user/14256" class="sb-nick" title="click to view profile">basile</a></b>: @TH: answer posted</span></div>

<div class=" shoutbox-msg shoutbox-even  " title="Posted 03/23/11 at 11:27am by TinHead"><span class="actions"></span> <span class="shout"><b><a href="/user/3886" class="sb-nick" title="click to view profile">TinHead</a></b>: authentication ... but I might have a way </span></div>

<div class=" shoutbox-msg shoutbox-odd  " title="Posted 03/23/11 at 11:20am by TinHead"><span class="actions"></span> <span class="shout"><b><a href="/user/3886" class="sb-nick" title="click to view profile">TinHead</a></b>: you guys are missing one thing </span></div>

<div class=" shoutbox-msg shoutbox-even  " title="Posted 03/23/11 at 10:47am by basile"><span class="actions"></span> <span class="shout"><b><a href="/user/14256" class="sb-nick" title="click to view profile">basile</a></b>: do you know what module has Rudolph used? Maybe there lies the solution.</span></div>

<div class=" shoutbox-msg shoutbox-odd  " title="Posted 03/23/11 at 10:40am by Gareth"><span class="actions"></span> <span class="shout"><b><a href="/user/2941" class="sb-nick" title="click to view profile">Gareth</a></b>: Big YAY ...my RBBB prop just landed......</span></div>

<div class=" shoutbox-msg shoutbox-even  " title="Posted 03/23/11 at 10:31am by Gareth"><span class="actions"></span> <span class="shout"><b><a href="/user/2941" class="sb-nick" title="click to view profile">Gareth</a></b>: Basile ....i just posted a forum topic on it ...</span></div>

<div class=" shoutbox-msg shoutbox-odd  " title="Posted 03/23/11 at 10:24am by basile"><span class="actions"></span> <span class="shout"><b><a href="/user/14256" class="sb-nick" title="click to view profile">basile</a></b>: can i help with something?</span></div>

<div class=" shoutbox-msg shoutbox-even  " title="Posted 03/23/11 at 10:22am by basile"><span class="actions"></span> <span class="shout"><b><a href="/user/14256" class="sb-nick" title="click to view profile">basile</a></b>: in my case xpath rules!!!</span></div>

<div class=" shoutbox-msg shoutbox-odd  " title="Posted 03/23/11 at 10:14am by Gareth"><span class="actions"></span> <span class="shout"><b><a href="/user/2941" class="sb-nick" title="click to view profile">Gareth</a></b>: ahh xml ..... data juggling</span></div>

<div class=" shoutbox-msg shoutbox-even  " title="Posted 03/23/11 at 10:10am by basile"><span class="actions"></span> <span class="shout"><b><a href="/user/14256" class="sb-nick" title="click to view profile">basile</a></b>: work</span></div>

<div class=" shoutbox-msg shoutbox-odd  " title="Posted 03/23/11 at 10:10am by basile"><span class="actions"></span> <span class="shout"><b><a href="/user/14256" class="sb-nick" title="click to view profile">basile</a></b>: @Gareth: actually for the past 2 week I am writing a converter from 1 xml format to a newer xml format of a file we are using at</span></div>

<div class=" shoutbox-msg shoutbox-even  " title="Posted 03/23/11 at 10:09am by rik"><span class="actions"></span> <span class="shout"><b><a href="/user/1069" class="sb-nick" title="click to view profile">rik</a></b>: the issue is not IF there is a tool/language that can be used - issue is WHICH tool fits your skills</span></div>

The above everytime ... can you guys check?

How about a small program to access get the html of http://letsmakerobots.com/shoutbox every x-seconds/x-minutes, parse it using xpath (all separate shoutbox lines have the "shoutbox-msg" class) and then send only the new ones to the serial LCD connected to the computer.

P.S.: maybe the solution lies in how the ShoutBox modules updates itself.
        @Rudolph: what shoutbox module are you using?