Re: [mythtv-users] Having fun with OSD
http://efilmcritic.com/fo.rdf looks to be the culprit. They don't use a description element that the script is looking for. Here's my "I just woke up and don't feel like testing it" hack. Looks like it should work..#!/usr/bin/perl -wuse strict;use LWP::Simple;use XML::RSS;use DBI;use HTML::Entities ();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'}" if ( $item->{'title'} ); $sNews .= " - $item->{'description'}" if ( $item->{'description'} ); $sNews .= " " if ( $item->{'title'} && $item->{'description'} ); }}$sNews = HTML::Entities::encode($sNews);`mythtvosd --template=scroller scroll_text="$sNews"`;On Dec 22, 2005, at 11:47 PM, Phill Edwards wrote:On 23/12/05, Brad DerManouelian <[EMAIL PROTECTED]> wrote: Do you have the URL to the feed causing the error? It's more likelythat the RSS feed doesn't conform to the standard than your librarybeing wonky. The URLs returned by the query are as below. I'll go through them oneat a time and try to find the culprit. I'll probably want to filterthe query anyway as this would scroll for hours so thanks for thepointer!| http://news.zdnet.com/2260-1_22.xml || http://efilmcritic.com/fo.rdf || http://newsrss.bbc.co.uk//rss/newsonline_uk_edition/technology/rss.xml || http://blogs.zdnet.com/BTL/wp-rss2.php || http://rssnewsapps.ziffdavis.com/pcmag.xml || http://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml || http://rss.topix.net/rss/world/australia.xml || http://rss.cnn.com/rss/cnn_offbeat.rss || http://rss.topix.net/rss/news/weird.xml || http://dwlt.net/tapestry/dilbert.rdf || http://newsrss.bbc.co.uk/rss/newsonline_world_edition/science/nature/rss.xml || http://rss.cnn.com/rss/cnn_tech.rss || http://abc.net.au/news/syndicate/topstoriesrss.xml || http://abc.net.au/news/syndicate/breakingrss.xml || http://abc.net.au/news/syndicate/worldrss.xml || http://abc.net.au/news/syndicate/entertainmentrss.xml || http://abc.net.au/news/syndicate/businessrss.xml || http://abc.net.au/news/syndicate/ruralrss.xml || http://abc.net.au/sport/syndicate/sport_all.xml || http://abc.net.au/sport/syndicate/rugby_union.xml || http://abc.net.au/sport/syndicate/cricket.xml || http://abc.net.au/sport/syndicate/soccer.xml || http://abc.net.au/sport/syndicate/rugby_league.xml || http://abc.net.au/sport/syndicate/afl.xml || http://abc.net.au/news/syndicate/offbeatrss.xml || http://abc.net.au/news/syndicate/sciencerss.xml || http://abc.net.au/news/syndicate/healthrss.xml || http://abc.net.au/news/syndicate/politicsrss.xml || http://mail.google.com/mail//feed/atomRegards,Phill___mythtv-users mailing listmythtv-users@mythtv.orghttp://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: [mythtv-users] Having fun with OSD
On 23/12/05, Brad DerManouelian <[EMAIL PROTECTED]> wrote: > Do you have the URL to the feed causing the error? It's more likely > that the RSS feed doesn't conform to the standard than your library > being wonky. The URLs returned by the query are as below. I'll go through them one at a time and try to find the culprit. I'll probably want to filter the query anyway as this would scroll for hours so thanks for the pointer! | http://news.zdnet.com/2260-1_22.xml | | http://efilmcritic.com/fo.rdf| | http://newsrss.bbc.co.uk//rss/newsonline_uk_edition/technology/rss.xml | | http://blogs.zdnet.com/BTL/wp-rss2.php | | http://rssnewsapps.ziffdavis.com/pcmag.xml | | http://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml | | http://rss.topix.net/rss/world/australia.xml | | http://rss.cnn.com/rss/cnn_offbeat.rss | | http://rss.topix.net/rss/news/weird.xml | | http://dwlt.net/tapestry/dilbert.rdf | | http://newsrss.bbc.co.uk/rss/newsonline_world_edition/science/nature/rss.xml | | http://rss.cnn.com/rss/cnn_tech.rss | | http://abc.net.au/news/syndicate/topstoriesrss.xml | | http://abc.net.au/news/syndicate/breakingrss.xml | | http://abc.net.au/news/syndicate/worldrss.xml| | http://abc.net.au/news/syndicate/entertainmentrss.xml| | http://abc.net.au/news/syndicate/businessrss.xml | | http://abc.net.au/news/syndicate/ruralrss.xml| | http://abc.net.au/sport/syndicate/sport_all.xml | | http://abc.net.au/sport/syndicate/rugby_union.xml| | http://abc.net.au/sport/syndicate/cricket.xml| | http://abc.net.au/sport/syndicate/soccer.xml | | http://abc.net.au/sport/syndicate/rugby_league.xml | | http://abc.net.au/sport/syndicate/afl.xml| | http://abc.net.au/news/syndicate/offbeatrss.xml | | http://abc.net.au/news/syndicate/sciencerss.xml | | http://abc.net.au/news/syndicate/healthrss.xml | | http://abc.net.au/news/syndicate/politicsrss.xml | | http://mail.google.com/mail//feed/atom Regards, Phill ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: [mythtv-users] Having fun with OSD
Do you have the URL to the feed causing the error? It's more likely that the RSS feed doesn't conform to the standard than your library being wonky. On Dec 22, 2005, at 11:10 PM, Phill Edwards wrote: Yeah, sorry about that. I wasn't handling some HTML entities that the shell doesn't like. Apply the mod that Graeme Hilton suggested earlier in the thread and you should be all set. Look at my quoted text above for where the lines go. I've made those changes but it still gives me the same errors: ... Use of uninitialized value in exists at /usr/lib/perl5/vendor_perl/5.8.5/XML/RSS.pm line 1432. Use of uninitialized value in exists at /usr/lib/perl5/vendor_perl/5.8.5/XML/RSS.pm line 1432. Use of uninitialized value in exists at /usr/lib/perl5/vendor_perl/5.8.5/XML/RSS.pm line 1432. Use of uninitialized value in exists at /usr/lib/perl5/vendor_perl/5.8.5/XML/RSS.pm line 1432. ... As it's coming from RSS.pm I'm wondering if there's something wrong with the perl-XML-RSS package I've installed? Regards, Phill ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: [mythtv-users] Having fun with OSD
> Yeah, sorry about that. I wasn't handling some HTML entities that the shell > doesn't like. Apply the mod that Graeme Hilton suggested earlier in the > thread and you should be all set. Look at my quoted text above for where the > lines go. I've made those changes but it still gives me the same errors: ... Use of uninitialized value in exists at /usr/lib/perl5/vendor_perl/5.8.5/XML/RSS.pm line 1432. Use of uninitialized value in exists at /usr/lib/perl5/vendor_perl/5.8.5/XML/RSS.pm line 1432. Use of uninitialized value in exists at /usr/lib/perl5/vendor_perl/5.8.5/XML/RSS.pm line 1432. Use of uninitialized value in exists at /usr/lib/perl5/vendor_perl/5.8.5/XML/RSS.pm line 1432. ... As it's coming from RSS.pm I'm wondering if there's something wrong with the perl-XML-RSS package I've installed? Regards, Phill ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: [mythtv-users] Having fun with OSD
On Dec 21, 2005, at 4:07 AM, Phill Edwards wrote:You inspired me. I just wrote this quick script to display myMythNews headlines. Anyone know if it's possible to trigger anexternal script while watching TV? I set it to run every hour, butI'd much prefer it to run when I hit a button on my remote and feellike being depressed.Use/modify it if you like.#!/usr/bin/perl -wuse strict;use LWP::Simple;use XML::RSS;use DBI;use HTML::Entities ();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'} "; }}$sNews = HTML::Entities::encode($sNews); `mythtvosd --template=scroller scroll_text="$sNews"`; Thanks Brad. I tried it but when I do a test run from the command lineI get these errors:Yeah, sorry about that. I wasn't handling some HTML entities that the shell doesn't like. Apply the mod that Graeme Hilton suggested earlier in the thread and you should be all set. Look at my quoted text above for where the lines go.___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: [mythtv-users] Having fun with OSD
> 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"`; Thanks Brad. I tried it but when I do a test run from the command line I get these errors: . Use of uninitialized value in exists at /usr/lib/perl5/vendor_perl/5.8.5/XML/RSS.pm line 1432. Use of uninitialized value in exists at /usr/lib/perl5/vendor_perl/5.8.5/XML/RSS.pm line 1432. Use of uninitialized value in exists at /usr/lib/perl5/vendor_perl/5.8.5/XML/RSS.pm line 1432. Use of uninitialized value in exists at /usr/lib/perl5/vendor_perl/5.8.5/XML/RSS.pm line 1432. Use of uninitialized value in exists at /usr/lib/perl5/vendor_perl/5.8.5/XML/RSS.pm line 1432. Use of uninitialized value in subroutine entry at /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi/XML/Parser/Expat.pm line 474. no element found at line 1, column 0, byte -1 at /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi/XML/Parser.pm line 187 I'm running FC3 with RPMs from ATrpms. Any ideas, anyone, why it would be giving these errors? Regards, Phill ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: [mythtv-users] Having fun with OSD
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 mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: [mythtv-users] Having fun with OSD
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 mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: [mythtv-users] Having fun with OSD
This reminds me of something I've wanted to do for a while -- build a scraper to grab current baseball line scores off of sportsline.com and display them in a transparent OSD. Ideally it would sit in a corner when called and cycle through games on a timer but also a remote button. Maybe I'll have time to put it together in the new year. Thanks for the info. ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: [mythtv-users] Having fun with OSD
On Dec 19, 2005, at 2:07 AM, Phill Edwards wrote: On 19/12/05, Brad DerManouelian <[EMAIL PROTECTED]> 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. Great idea! Can't wait to give it a try. Just make sure your OSD supports scrolling text. ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: [mythtv-users] Having fun with OSD
On 19/12/05, Brad DerManouelian <[EMAIL PROTECTED]> 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. Great idea! Can't wait to give it a try. Thanks, Phill ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: [mythtv-users] Having fun with OSD
On Dec 18, 2005, at 10:17 PM, Support [ Ian Ward ] wrote: 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. man irexec Use irexec. Example: 1) create /etc/irexec.conf or maybe a local user conf 2) put there something like this (just the stuff between the ===): === begin prog = irexec button = NEWS_BUTTON config = /usr/local/bin/mynews end === the config = [command] line specifies what [program] to execute when you press the button. The button, of course, must have been defined in lircd.conf 3) put in one of your boot scripts this line: /usr/bin/irexec -d /etc/irexec.conf Perfect. Thanks! ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: [mythtv-users] Having fun with OSD
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. man irexec Use irexec. Example: 1) create /etc/irexec.conf or maybe a local user conf 2) put there something like this (just the stuff between the ===): === begin prog = irexec button = NEWS_BUTTON config = /usr/local/bin/mynews end === the config = [command] line specifies what [program] to execute when you press the button. The button, of course, must have been defined in lircd.conf 3) put in one of your boot scripts this line: /usr/bin/irexec -d /etc/irexec.conf ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: [mythtv-users] Having fun with OSD
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 !!!" Ian ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: [mythtv-users] Having fun with OSD
That's the best thing ever. Although, I find that scrolling text is more effective. Now you've got me thinking about using a news web service and scrolling it along the bottom of my screen while watching TV On Dec 18, 2005, at 5:08 PM, Support [ Ian Ward ] 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 !!!" Ian ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: [mythtv-users] Having fun with OSD
...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 !!!" > > Ian > ___ > mythtv-users mailing list > mythtv-users@mythtv.org > http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users > ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
[mythtv-users] Having fun with OSD
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 !!!" Ian ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users