Posts: 11
Joined: Apr 2004
Reputation:
0
nlemoz
Junior Member
Posts: 11
i think that for the tv guide requests to have any hope of succeeding, the ty guide script needs to be implmented in two parts.
one part is a reusable tv guide display which can be used for all tv guides with language etc. this module will allow the user to select which tv guide they want, time, date, channel lists etc.
the other module will be a script which grabs the appropriate tv guide from somewhere. this part needs to be replacable for different areas, and should be easily implemented so that we can get the maximum amount of people implmenting it for their part of the world. possibly it would consist of just a couple of functions that will take a date and time (span?) and retrieve all shows for that time. their might be an info method that would return information on the channels covered and the number of channels
eg
tvgrabinfo->region = "gotham city"
tvgrabinfo->type = "free to air"
tvgrabinfo->number = 7
the grabber would return xml with all shows it can get and the time span covered. caching would be nice in the main module.
any thoughts from anyone?
Posts: 174
Joined: Jan 2004
Reputation:
0
i started a tv guide in python using the listing.xml used in xbmp tv guide.
but i decided to stop it so i may share my work later for people who want to continue it
Posts: 11
Joined: Apr 2004
Reputation:
0
nlemoz
Junior Member
Posts: 11
for some reason i must have turned reply notification off, so i didn't see your replies until now.
both of these projects sound very interesting. between the last time i checked this forum and now, i made a python script that grabs a tv listing for my area (australia) and prints out xml data to a (windows text) console. i haven't worked out how to make it a module so it could be called from a front-end because this is my first day with python (although i have adequate experience with other languages).
i noticed that there is already a perl based xmltv grabber for my area, but i wanted one in python for the xbox so i built it. still needs a bit of error checking and doco, and of course an xbox front end, but we'll see.
i would be very interested to see what you guys have so far.
maybe you could add an option to run a local (python) xmltv grabber and/or read in a local xml file.
Posts: 11
Joined: Apr 2004
Reputation:
0
nlemoz
Junior Member
Posts: 11
have written the almost all of the backend, now porting to the xbox (from windows) and writing the gui.
i have a couple of questions:
sys.argv[0] doesn't seem to be defined??
if it isn't, how else can i find dircetory that script was launched from?
import xml.parsers.expat fails with "no module named pyexpat", do i need to manually add, update from cvs, use a different parser or what?
Posts: 11
Joined: Apr 2004
Reputation:
0
nlemoz
Junior Member
Posts: 11
a little status update.
i have almost finished an alpha of the tv guide.
it now works reasonably well (imho)
things to do:
allow reordering of channels in display
vertical spacing of shows by time/duration
to make this whole thing work, i will need to build more listing grabbers. here is a smal spec for a grabber:
requirements:
can have any name ending in grabber.py
must have a function getinfo() that returns a list with a grabber description and channel names
eg
def getinfo():
return [["aus fta renmark"],["abc","win","sbs"]]
must have a function
getguide(tv_date, tv_time, sel_channels)
which takes a python date(tv_date), an integer indicating the hout in 24 hour format, and a list of strings (taht have been returned from getinfo() ) indicating channels that should be grabbed for this date and time.
it must return a text string consisting of xml as follows:
<programme channel="win" start="200404060400">
<title>"justice league"</title>
</programme>
<programme channel="win" start="200404060430">
<title>"good morning america"</title>
</programme>
<programme channel="sbs" start="200404061250">
<title>"pol pot and the khmer rouge"</title>
</programme>
where numbers like 200404061250 indicate date and time of the program <span style='color:red'>in gmt</span>. this is very close to the mythtv format, so i am hoping it would be easy to adapt current grabbers.
i have avoided specifying that the duration of the show should be in the returned text, as this makes writing the grabber a lot easier. i have also left off the description category, as most grabbers that get all descriptions cause far too many hits on the target website. i may put in an optional field that can be returned that might be used by the guide to get the grabber to retrieve details for one show, but it would be optional.
anyway, what do people think, will anybody be interested in coding these for their own region?
Posts: 11
Joined: Apr 2004
Reputation:
0
nlemoz
Junior Member
Posts: 11
i probably should also mention that almost all of the grabbers should be able to be coded and debugged on a pc (or a mac etc) without going near an xbox. this should also make life easier for potential coders. i can also provide people with a few sample grabbers that can be modified.
Posts: 7
Joined: Jan 2004
Reputation:
0
hi, nlemoz i really appreciate what your doing, i just have one question, does the parser you're working on support wa and foxtel? :)
also, i like to use yourtv.com.au as my internet tv guide, but i've heard the objecting to projects like this using their guide for some reason.
Posts: 11
Joined: Apr 2004
Reputation:
0
nlemoz
Junior Member
Posts: 11
the current grabbers use yahoo australia's tv guides. they lists just about everything, so only minor modifications would be needed for different regions. they list optus, foxtel and free to air.
i will build a grabber for each of foxtel optus and fta and provide a readme for the simple modification to set it for your region. the way it would work is, you download a grabber, change it for your region if necessary following simple instructions, and then ftp it to a directory on the xbox. the tv guide will then display it in its settings as a selection for guide grabbing. you can have as many grabbers as you want and the guide will pick them up automatically. all this is done now.
i suppose people will want to look at the app before they decide if it's worth it to write a grabber. the problem is i can't write a grabber for every region on the planet on my own.
Posts: 74
Joined: Mar 2004
Reputation:
0
im in the aussie region and would love to try out this new tvguide code. reckon you can post it