SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Customizations
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Customizations This forums is for discussing and sharing user-created modifications for the SageTV application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss customizations for SageTV version 6 and earlier, or for the SageTV3 UI.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12-04-2004, 10:20 AM
ToonGal's Avatar
ToonGal ToonGal is offline
Sage Aficionado
 
Join Date: Jan 2004
Location: Bay Area, CA, USA
Posts: 306
Sports scores plug-in

This is literally what I was in the process of before my SageTV 'sabbatical'. The goal should be a full sports-reporting suite. I'll post my preliminary notes on this in case anyone can leverage this into something useful. It started when I found a 3rd party web-scraper, and I had enhanced it from there. XMLSports (http://sourceforge.net/project/showf...group_id=96721) was basically a web scraper that processes the ESPN pocketPC information. This was an exceptionally interesting find, because the web site is relatively simple to parse for basic sports scores, standings, news, etc. Because it is not very web-intensive, it was easy to adapt what was here to a processor. My last version never compiled, because I was literally working on this at the moment of my 'life event'.

Since my source code is unusable in the current form, XMLSports is as good a place to scrape info as a starting point. Here are my notes on the type of things I researched to make a fuller sports reporting suite. Unedited and unresearched since the first week of September, but still might be of use in some form.

See you soon, gang.

-- cut here -- cut here -- cut here -- cut here -- cut here -- cut here --


SPORTS REPORT SUITE -- DESIGN DOCUMENT
9:08 PM 9/05/2004

team data scraped from: http://proxy.espn.go.com/wireless/espn/html/pocketpc

===== SageTV display

Two level horizontal menu -> data panel underneath
-up/down: selects top menu, sub menu, data panel info
-left/right: shifts menu selection on menus; data panel info

Top menu bar: MLB NFL NBA NHL CollFB CollBB

-NFL submenu bar: News Scores Standings
--News: scrape <hr> to EOF, culling headline/URL
---Item: scrape <b> to "..."/<hr> + if(Next page) recursively
--Scores: scrape <hr> to EOF, reformat for preview/score
---Item/preview: scrape <b> to "..."/<hr> + if(Next page) recursively
---Item/score: scrape <hr> to bottom of box score + recap, reformat
---Item/score/recap: scrape <b> to "..."/<hr> + if(Next page) recursively
--Standings: 3rd level menu (vertical?) for {AFC|NFC}+{North,South,East,West}
---Item/menu: scrape <hr> to EOF for selected division, reformat

===== Scoreboard sources (NFL examples)

ESPN: http://sports.espn.go.com/nfl/scoreboard (SCORE: score/q, stats: p/r/r; PREVIEW: time, network, record (H/A), line, preview, stats)
FOX: http://msn.foxsports.com/nfl/scores (SCORE: logo, score/q, record, stats: p/r/r; PREVIEW: time, network, logo, record, O/U, line)
NFL: http://www.nfl.com/scores.shtml (SCORE: score/q, record, stats: p/r; PREVIEW: time, record)

===== NFL game data structure
GAME:
game date/time
status (quarter/time, Final)
broadcast network
headline (+ URL?)
AWAY:
away-team code
away-team city
away-team name
away-team record (overall, h/a)
away-team spread (line, O/U)
away-team score (Q1-4+OT, total)
away-team pass (name, stats)
away-team rush (name, stats)
away-team rec (name, stats)
HOME:
<same>

===== Team lookup data

paradigm: sport, ESPN team code, ESPN team name, city, team name, fgcolor, bgcolor
Example1: NFL, DAL, Dallas, Dallas, Cowboys, xxxxxx, 002E4D
Example2: NFL, PHI, Philadelphia, Philadelphia, Eagles, 114746, 003A42
Example3: NFL, NYG, NY Giants, New York, Giants, xxxxxx, 003155

===== Team icon sources

Yahoo: http://us.i1.yimg.com/us.yimg.com/i/.../80x60/dal.gif (80x60)
ESPN: http://espn.starwave.com/i/nfl/clubhouse/dal.gif (126x126)
FOX: http://msn.foxsports.com/fe/img/NFL/Jellies/Small/6.gif (30x20)
FOX: http://msn.foxsports.com/fe/img/NFL/Jellies/Large/6.gif (85x56)
FOX: http://msn.foxsports.com/fe/img/NFL/...go/Small/6.gif (25x25)
FOX: http://msn.foxsports.com/fe/img/NFL/...go/Large/6.gif (80x80)
NFL: http://images.nfl.com/images/logos65x40/DAL.gif (65x40)
NFL: http://images.nfl.com/images/logos/80x60/DAL.gif (80x60)
CNN: http://i.cnn.net/si/images/football/...cowboys_30.gif (30x30)
CNN: http://i.cnn.net/si/images/football/...cowboys_65.gif (65x65)
CNN: http://i.cnn.net/si/images/football/...owboys_100.gif (100x100)
Snet: http://images.sportsnetwork.com/site...wboys_logo.gif (114x80)

===== Network icon sources

ABC: http://espn.starwave.com/i/scoreboar...rkLogo_abc.gif (55x14)
ABC/sports: http://espn.go.com/i/sportindex/onair_abcsports.gif (260x24)
ABC/sports: http://espn.starwave.com/i/abcsports/abcsports_fpo.gif (162x37)
ABC/MNF: http://corporate.disney.go.com/media...tefootball.gif (150x100)
CBS: http://wwwimage.cbs.com/Common/images/pt_w_logo.gif (81x18)
ESPN: http://espn.starwave.com/i/scoreboar...kLogo_espn.gif (55x14)
ESPN2: http://espn.starwave.com/i/scoreboar...Logo_espn2.gif (56x14)
FOX: http://msn.foxsports.com/fe/img/Misc...-on-fox-sm.gif (73x14)
TNT: http://www.nba.com/media/broadcastlo...adcast_TNT.gif (24x8)
http://www.espn.go.com/i/frontpage/p...pearing_90.gif

===== Sport icon sources

MLB: http://mlb.mlb.com/mlb/images/offici..._mlb_33x18.gif (33x18)
MLB: http://espn.go.com/i/teamlogos/leagues/lrg/mlb.gif (110x110)
NBA: http://www.nba.com/rm/images/nbaLogo.jpg (48x74)
NBA: http://espn.go.com/i/teamlogos/leagues/lrg/nba.gif (110x110)
NBA/EAST: http://www.nba.com/images/log_east_sm.gif (65x65)
NBA/WEST: http://www.nba.com/images/log_west_sm.gif (65x65)
NFL: http://espn.go.com/i/teamlogos/leagues/lrg/nfl.gif (110x110)
NFL/AFC: http://images.nfl.com/images/afc.gif (93x42)
NFL/NFC: http://images.nfl.com/images/nfc.gif (48x46)
NHL: http://espn.go.com/i/teamlogos/leagues/lrg/nhl.gif (110x110)
Reply With Quote
  #2  
Old 12-04-2004, 08:18 PM
evilpenguin's Avatar
evilpenguin evilpenguin is offline
SageTVaholic
 
Join Date: Aug 2003
Location: Seattle, WA
Posts: 3,696
Very good idea, I was actually thinking that something like this, combined with the OSD would make a great custom sports ticker that you could display on any channel.
Reply With Quote
  #3  
Old 12-07-2004, 07:58 AM
ToonGal's Avatar
ToonGal ToonGal is offline
Sage Aficionado
 
Join Date: Jan 2004
Location: Bay Area, CA, USA
Posts: 306
Quote:
Originally Posted by evilpenguin
Very good idea, I was actually thinking that something like this, combined with the OSD would make a great custom sports ticker that you could display on any channel.
Truth be told, lots of free sports tickers already exist and do a decent enough job. If you really wanted a sports ticker, I'd recommend ESPN's Bottomline available at http://espn.go.com/bottomline/.

I was thinking of a sports reporting suite along the lines of what we already have for weather. That ESPN PocketPC site interface should be relatively easy to replicate on HTPC screens, IMHO.
Reply With Quote
  #4  
Old 02-02-2005, 06:01 AM
ToonGal's Avatar
ToonGal ToonGal is offline
Sage Aficionado
 
Join Date: Jan 2004
Location: Bay Area, CA, USA
Posts: 306
Meedio sports plug-in

http://www.meedio.com/maid/detail.ph...-A0D77904B540}

Just saw this today. I'd reformat the page much differently myself (far too much dead space), but from what I can reverse engineer, it looks like he might have even used my spec. He rips score data, uses the team icons, and reads summaries from Yahoo.

Simple, but looks good. In case it is of use to anyone. HTPC stuff sure is fun.
Reply With Quote
  #5  
Old 09-25-2005, 01:23 AM
ToonGal's Avatar
ToonGal ToonGal is offline
Sage Aficionado
 
Join Date: Jan 2004
Location: Bay Area, CA, USA
Posts: 306
The Meedio plug-in I referenced in the last post is cool, but his parser is partially broken and he's no longer supporting it. I've debugged what's wrong with his but don't want to be trapped by others' designs. Why is this relevant to SageTV users? Well, there's the possibility of me being useful to the SageTV community at large.

As I prototyped how I would overhaul my own personal engine, I realized that my web scraper could easily be used as a SageTV source, without much additional work. I'm now highly motivated to integrate this into SageTV, instead of continuing with Meedio, because of my recent MVP purchases. I can extend SageTV via MVP, but not Meedio. As a result, I figured I'd take one last stab to see if integration is possible, if there is an adventurous Studio user out there. If not, I'll release my own overhauled Meedio plug-in and relocate my server from my office to the family room, so I have access to the plug-in info I want.

The ones I prototyped last year (movie showtimes, comic strips, sports, etc.) were all in Java, because that's what SageTV used. It's not my language of experience, so I wrote my personal web scrapers in perl, where I have tons of familiarity. They are up and running in Meedio and now want to get them into SageTV.

I'm including a sample output of NFL scores in a format simulating the weather.txt output file for weather. The Meedio output has the same data, but in a different format, tailored to get it into the Meedio library. I don't know if the weather-inspired format is useful to Studio users, but I can scrape any data easily and output it in whatever form most convenient. I can use perl2exe to convert my programs for windows use, so a perl compiler wouldn't be necessary in the final version, to a potential studio partner.

All local files referenced (i.e. team logos, game image, etc.) are downloaded from the internet in my perl program, if they don't already exist. I have my own ideas about layout, too, but that's more in control by the Studio side, I'd guess. Have scripts for team standings, etc. too, if things work out. Have ideas for an entire suite, some of which I documented (and think posted here) a while back.

Just over a year since the ex asked for the divorce, and I really miss programming. Hope this works out for all concerned, but am moving forward on my own (worst-case) nonetheless. Pulled two all nighters already and having too much fun on this as it is.
Attached Files
File Type: txt sagesports.txt (86.1 KB, 453 views)
Reply With Quote
  #6  
Old 09-25-2005, 06:21 PM
PGPfan's Avatar
PGPfan PGPfan is offline
Sage Fanatic
 
Join Date: Apr 2003
Location: Oldtown, Idaho USA
Posts: 862
Hi ToonGal,

Good to see you around here again! This looks like it'd be a really cool plug-in.
Around a year and a half ago I think you'd mentioned that you'd been offered Studio. (I think the thread turned 'sour' so I hope I'm not bringing up a sore spot) If that was the case, maybe you should shoot Jeff and Dan and email and see if you'd still be able to accept the offer.

The lack of a MVP on Meedio is the reason I've never bought it. Sage for me, but I do wish that we could have some of those plug-ins. I believe you could do wonders if you had Studio...

-PGPfan
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 11:51 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.