Thanks! I actually ran into that and never posted a mod except my mod
only accounted for double-quotes. Yours like like more of a real fix. :)
On Dec 20, 2005, at 6:48 AM, Graeme Hilton wrote:
Thanks for the script Brad.
Here's a modification so that it doesn't bomb on odd characters:
Add after use DBI;
use HTML::Entities ();
and just before the last line, add
$sNews = HTML::Entities::encode($sNews);
Cheers,
--
Graeme Hilton
On Mon, 19 December, 2005 3:03 am, Brad DerManouelian wrote:
You inspired me. I just wrote this quick script to display my
MythNews headlines. Anyone know if it's possible to trigger an
external script while watching TV? I set it to run every hour, but
I'd much prefer it to run when I hit a button on my remote and feel
like being depressed.
Use/modify it if you like.
#!/usr/bin/perl -w
use strict;
use LWP::Simple;
use XML::RSS;
use DBI;
my $dbh = DBI->connect('dbi:mysql:mythconverg','mythtv','mythtv');
my $sql = "SELECT url FROM newssites ORDER BY updated DESC";
my $sth = $dbh->prepare( $sql );
$sth->execute || die ('Could not execute SQL statement: $sql');
my $sNews;
while ( my $row = $sth->fetchrow )
{
my $rss = new XML::RSS;
$rss->parse( get( $row ) );
foreach my $item (@{$rss->{'items'}})
{
$sNews .= "$item->{'title'} - $item->
{'description'} ";
}
}
`mythtvosd --template=scroller scroll_text="$sNews"`;
On Dec 18, 2005, at 5:56 PM, Sasha Z wrote:
...and so how do you enforce that? But that is a funny idea. Kudos!
On 12/18/05, Support [ Ian Ward ] <[EMAIL PROTECTED]> wrote:
I thought I would share the mythtv user's crontab with the list.
Open Source is even good for parenting ;-)
0 21 * * * /usr/bin/mythtvosd --template=alert
alert_text="Jessica or
Tegan, who is doing the wash up??"
20 21 * * 0-4 /usr/bin/mythtvosd --template=alert alert_text="!!!
Time
for BED !!!"
--
Graeme Hilton
_______________________________________________
mythtv-users mailing list
[email protected]
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
_______________________________________________
mythtv-users mailing list
[email protected]
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users