Re: [icebox-devel] IceTV XML to TGD
Brought to you by:
purbanec
From: Daniel D. <dan...@ic...> - 2005-11-22 01:10:43
|
fr...@sp... wrote: > Quoting Peter Urbanec <ice...@ur...>: > >> Fredrick Meunier wrote: >> >>> Is there any interest in producing a converter from IceTV XML to TGD >>> files? It would provide an inexpensive way to take advantage of the >>> IceTV service as a Mac user. >>> >> I am sure that there would be interest in a light-weight Open Source >> IceTV XML parser, but am not aware of any work being done on that. It's >> a lot of work. I wanted one to use on the SLUG. >> > > I had hoped that some of the work done for the JavaXMLTV to TGD stuff would be > useful, and that XML parsing wouldn't be too much work in Java (which has > proven to be great for cross-platform Toppy apps). > > What are the complications in doing an IceTV XML parser? Is it just a comment on > how hard the c XML libraries are to use? > Parsing XML into memory and then writing it out in a new format can be a pain in the arse... I would only do it if I couldn't get the data in the format I want to start off with. > >> A better approach to get a Toppy solution for the Mac would be to port >> the existing ice_daemon to OSX. After that you just need to port puppy >> or make use of Nathan's MacTF utility to transfer the flat file ICE EPG >> files to the Toppy, where the ICE TAP will process the files. >> > > I must admit I hadn't considered this, and it should be fairly straightforward > as you say. I'll download the source to ice_daemon tonight and have a look to > see how much work it would be to port. > You can cetainly do this and Daniel Hall our support guy has a version of the daemon running on one of his Linux boxes at home. If you want a GUI based Mac application then you may not want to do the full ice_daemon fuctionality. Another possibility is to just write a simple(ish) script that grabs the data and sends the file to the toppy, you could then run this in cron. The actual data that the daemon uses is really quite simple, all the separate files (and the latest TAP) are send in one big file with delimiters. ex ICE_COMMENT SHOW_COUNT="1761" ICE_DATA FILE="20051122_20051122004148_EPG_CACHE" DIR="\ICE" TYPE="guide" 200511211300|4|60|Da Vinci's Inquest|12|Tommy's on the Corner|A police chase ends in tragedy and Da Vinci is left to make sense of the mess. Meanwhile, an armoured car stick-up has the rest of the crew baffled. Nicholas Campbell, Ian Tracey, Venus Terzo 200511211300|5|30|SPORT: Sailing||Volvo Round the World Ocean Race - 1st Leg|The Round the World Ocean race kicked off from Vigo, Spain on Sunday November 13th and the teams were immediately thrown in the deep end (so to speak) with 5-6 metre ocean swells. The seven teams will battle it out for race points in leg one, racing from Vigo to Cape Town. ...... ICE_DATA FILE="20051123_20051122004148_EPG_CACHE" DIR="\ICE" TYPE="guide" 200511221300|3|30|Scrubs|9|My Old Friend's New Friend|JD is ecstatic about his impending promotion - only one week remains until he is officially a fully-fledged, card-carrying Doctor. Not even the loony new Doctor Clock can burst his balloon. Zach Braff, Donald Faison, Sarah Chalke, John C. McGinley 200511221300|4|30|Nightline|||National and international summary of the news as it happened on this day, featuring latest footage and interviews with those who were there and those who know. 200511221300|5|30|The Osbournes|15|What Goes Up|Kelly prepares herself for the MTV Music Awards where she's set to perform her version of Madonna's "Papa Don't Preach". Meanwhile, Ozzy and Sharon head North for a Presidential reception, where the U.S. head of state inexplicably lathers the ageing rocker with praise. 200511221315|2|60|MOVIE: Storm Over Wyoming|9||Two unemployed cowhands arrive in Wyoming smack bang in the middle of a range war. After preventing a lynching, the cowhands try to get to the bottom of the trouble. Bill Kennedy, Tim Holt 2 ...... ICE_DATA FILE="ice_epg_loader_200511111435.tap" DIR="\ProgramFiles\Auto Start" TYPE="tap" ENCODING="base64" MD5SUM="8ed230d3f48bd121eb5989b0bd6c6107" VEZBUE1JUFMCAwAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAEKAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAElDRSBFUEcgTG9hZGVyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAABJQ0UAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA ...... ICE_DATA FILE="map.ini" DIR="\ICE" TYPE="map" [Channel 1] channel_id=1 region=Sydney name=SBS The separator starts with "ICE_DATA" and there are fields like FILE - name of original file DIR - Destination directory on topfield TYPE - Type of file. tap, guide, map ENCODING - base64 for tap files MD5SUM - md5sum of original file. In essence all your script needs to do is read the file and each time you see "ICE_DATA" start writing to a new file using the name in "FILE", once the file is complete you can use "DIR" to decide where to put it. If the file is base64 encoded then decode it and compare the decoded versions md5sum with the supplied md5sum. > >> The other option is to set up a cron job to run wget once a day to >> retrieve the ICE EPG files and then send these to the Toppy. All the >> required information is already present in the published source code. >> > > Where would the ICE EPG files be obtained from? Do IceTV provide those directly > as well as the XML feed? (Aplogies if these are basic questions, I've gone over > the IceTV website in some detail, but have not yet downloaded the sourceforge > source code). > If you are a current subscriber (or on a free trial), you can use the following link http://www.icetv.com.au/cgi-bin/epg/iceguide.cgi?op=topguide to retrieve the guide exactly as the daemon does it. Authentication is done through http authentication. > >> Both of these approaches are almost trivial in comparison with coding an >> XML parser, but will require the use of a command line, rather than just >> a point-n-click approach. I guess dressing the above with a GUI could be >> an interesting project for a Mac hacker and would result in something >> acceptable to typical Mac users. >> > > True. > > Fred > > > ------------------------------------------------------- > This SF.Net email is sponsored by the JBoss Inc. Get Certified Today > Register for a JBoss Training Course. Free Certification Exam > for All Training Attendees Through End of 2005. For more info visit: > http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click > _______________________________________________ > icebox-devel mailing list > ice...@li... > https://lists.sourceforge.net/lists/listinfo/icebox-devel > -- *Daniel Drysdale* Software Engineer *Work:* +61 2 8424 7508 *Mobile:* +61 410 60 70 92 *Fax:* +61 2 9901 3679 *Email:* dan...@ic... <mailto:dan...@ic...> *Professional Profile <https://www.linkedin.com/e/fps/4064139/>* *My Blog <http://blog.drysdale.org>* *Ice TV Pty Ltd* <http://www.icetv.com.au> 34-36 Chandos St St Leonards <http://maps.google.com/maps?q=34-36+Chandos+St%2CSt+Leonards%2CSydney%2CNSW+2065%2CAustralia&hl=en> Sydney, NSW 2065 Australia See who we know in common <https://www.linkedin.com/e/wwk/4064139/> Want a signature like this? <https://www.linkedin.com/e/sig/4064139/> |