Download info for bash script

Download info for bash script

Postby marc.aronson » Sat Apr 18, 2009 7:35 pm

I've written some scripts to simplify the process of setting up my clear QAM channels in my mythtv system. I'm able to download useful information from Silicon Dust that helps me map frequencies to channels. What I need now is the ability to download the channel #, callsign and xmltvid information for all channels that exist in one of my schedules direct lineups. Is there any easy way to do this from a bash script? Thanks for your help!

Marc
marc.aronson
 
Posts: 18
Joined: Wed Aug 22, 2007 7:50 am

Re: Download info for bash script

Postby rmeden » Sat Apr 18, 2009 10:05 pm

it doesn't change very much.. why not just look at the "lineup report" from the SD website and copy/paste?

You can also look at the raw XML directly

Robert
rmeden
SD Board Member
 
Posts: 1495
Joined: Tue Aug 14, 2007 2:31 pm
Location: Cedar Hill, TX

Re: Download info for bash script

Postby marc.aronson » Sat Apr 18, 2009 11:07 pm

rmeden wrote:it doesn't change very much.. why not just look at the "lineup report" from the SD website and copy/paste?

You can also look at the raw XML directly

Robert

Robert, thanks for replying. The process of setting up a clear-QAM tuner in mythtv is very painful for several reasons. I've written a script that automates a reasonable chunk of the process by correlating the data that Silicon Dust publishes with the results from the mythtv channel scanner and the schedules direct lineup data. What your are saying makes sense -- I could simply copy-and-paste it, but I really want to fully automate the process.

Marc
marc.aronson
 
Posts: 18
Joined: Wed Aug 22, 2007 7:50 am

Re: Download info for bash script

Postby rmeden » Sat Apr 18, 2009 11:52 pm

The easiest ting to do is find where MythTV downloads the guide data and get the channel info from the last download. (I assume it keeps it). You can always fetch it.. you only need to separate start/stop by a minute... all you want is the lineup info.
rmeden
SD Board Member
 
Posts: 1495
Joined: Tue Aug 14, 2007 2:31 pm
Location: Cedar Hill, TX

Re: Download info for bash script

Postby marc.aronson » Sun Apr 19, 2009 8:18 am

rmeden wrote:The easiest ting to do is find where MythTV downloads the guide data and get the channel info from the last download. (I assume it keeps it). You can always fetch it.. you only need to separate start/stop by a minute... all you want is the lineup info.

rmeden, thank you for replying. Unfortunately, I had already investigated this before posting here and it won't work. The lineup information is loaded into the channel table of the mythconverg database. The problem is that for DVB/QAM tuners, it only loads the data for the channels that you have already been found from a channel scan and filled in with the correct xmltvid code. Since the goal of my script is to automate the process of identifying the correct callsign & xmltvid for new channels, the very information I need is not yet in the database when I run my script.
marc.aronson
 
Posts: 18
Joined: Wed Aug 22, 2007 7:50 am

Re: Download info for bash script

Postby rmeden » Sun Apr 19, 2009 11:33 am

I'm talking the raw file downloaded from Tribune (MythTV uses wget). Does MythTV delete it after populating the table?

If I had written it, I would keep the last copy in case it's needed for troubleshooting....

Robert
rmeden
SD Board Member
 
Posts: 1495
Joined: Tue Aug 14, 2007 2:31 pm
Location: Cedar Hill, TX

Re: Download info for bash script

Postby marc.aronson » Sun Apr 19, 2009 6:20 pm

rmeden wrote:I'm talking the raw file downloaded from Tribune (MythTV uses wget). Does MythTV delete it after populating the table?

If I had written it, I would keep the last copy in case it's needed for troubleshooting....

Robert

Robert, thanks for the follow up -- I see your point. I just ran mythfilldatabase and then used "find" to look at all files changed in the last 40 minutes. Unfortunately, nothing showed up that looked promising. Having said this, I think this is the right track. I believe that mythfilldatabase calls tv_grab_na_dd to get the data from schedules direct. If I can find the source code for tv_grab_na_dd then I should be able to figure out how to access the data. I'm already using wget to get data from silicon dust -- all I need to do now is figure out the correct URL to pass to wget to retrieve my schedules direct lineup. I'm hoping that the tv_grab_na_dd source code will show me the answer. Of course, any suggestions you might have on this would be greatly appreciated :-).

Thanks again for the pointer!

Marc
marc.aronson
 
Posts: 18
Joined: Wed Aug 22, 2007 7:50 am

Re: Download info for bash script

Postby rmeden » Sun Apr 19, 2009 6:59 pm

MythTV uses WGET to download the data. Check out the developer section of this forum... there's even been some posts today on the WGET thread.

If you really want tv_grab_na_dd, you can find it by browsing the CVS repository at http://xmltv.org

Robert
rmeden
SD Board Member
 
Posts: 1495
Joined: Tue Aug 14, 2007 2:31 pm
Location: Cedar Hill, TX

Re: Download info for bash script

Postby marc.aronson » Sun Apr 19, 2009 9:53 pm

Robert, thanks for the pointer. I've made some progress based on your pointers -- I appreciate it. At this point I have 2 viable choices:

1. Use wget and parse the xml file.

2. Use tv_grab_na_dd and parse the xml file that produces.

Marc
marc.aronson
 
Posts: 18
Joined: Wed Aug 22, 2007 7:50 am

Re: Download info for bash script

Postby todd » Sat Jun 27, 2009 11:03 am

Marc, did you ever come up with a solution for this? I think I'm trying to do the same thing, correlate channel info with the xmltvid data.

Also, is your silicondust lineup server to myth DB script published anywhere?
todd
 
Posts: 2
Joined: Sat Mar 01, 2008 6:22 pm

Next

Return to General Discussions

Who is online

Users browsing this forum: No registered users and 2 guests

cron