Archive for the 'MLB Schedule' Category

MLB Schedule 2.14

I just released an update to the MLB Schedule widget. The only change here was to fix a major bug with the widget that didn’t correctly load past game results.

You can download it at the MLB Schedule website.



MLB Schedule 2.6

I just went ahead and released an update to the MLB Schedule widget. The largest change is that the widget is now using an alternate data source if the primary source doesn’t have any information. This is crucial for Spring Training information, since the primary source doesn’t have exhibition games. So, you should now be able to see Spring Training games for your favorite team in the widget.

You can download it at the MLB Schedule website.

  • Added in an alternate source for information, which includes Spring Training games.
  • Updated the look of the team names.
  • Fixed issue when there is no game channel for a future game.


MLB Schedule 2.4 and MLB Standings 1.7

I’ve just posted updates to both of the Major League Baseball widgets. They both provide a handful of upgrades, but the biggest new feature is the ability to minimize the MLB Schedule widget. If you want to follow a team, but don’t want to be bothered with details like starting pitchers and TV networks, this will be perfect for you. I’ve found it useful for following other teams in my favorite team’s division, so I can see how they’ve been performing.

You can download the new versions at the MLB Schedule and MLB Standings websites.


MLB Schedule 2.4

  • Added the ability to make the widget smaller, which includes less information about each game.
  • Added a drop shadow to the widget, so it fits in better with all others.
  • Fixed an issue with today’s games which are delayed.

MLB Standings 1.7

  • Changed the look of the background image.
  • Moved the update notifier to the front of the widget, so that it’s more visible.
  • Changed all URLs from burgundylogan.com to loganrockmore.com .
  • Fixed the height calculations when viewing the Wild Card standings.
  • Fixed spacing when using widget on a Leopard system.


MLB Schedule 2.0

MLB Schedule Icon I’ve just updated MLB Schedule to version 2.0, which includes a lot of major changes for the 2008 MLB Season. The majority of the changes have to do with the backend, which now uses PHP rather than Python. This allows the widget to refresh much, much faster when you activate Dashboard. The other most noticeable change is the background color changing based on the team that you have selected. Version 2.0 is available immediately and can be downloaded at the product page.

  • Scores are now retrieved and parsed using PHP rather than Python.
  • The background image is now based on the team colors of the selected team.
  • A slider for choosing the number of games was added to the preferences.
  • Moved the update notifier to the front of the widget, so that it’s more visible.
  • Changed all URLs from burgundylogan.com to loganrockmore.com .


WebKit and Overflow

So I had been noticing for the last week or two that the pitching statistics in the MLB Schedule widget were getting a little screwed up and overlapping each other, making it difficult to read. Others were noticing it too, mentioning it via email and forum.

widget-overlapping.png

This was odd because previously the widget had fixed this issue by truncating the strings and adding an ellipsis to the end. The full text can be see by hovering over the text with the cursor.

widget-not-overlapping.png

The only thing that’s changed over the last few weeks with the Dashboard was the WebKit update that came with Safari 3. As it turns out, that was the issue. Previously, the widget used the CSS attributes overflow-x:hidden; and overflow-y:hidden; (I’m not sure why I did this, but it worked). However, I had to change this to just overflow:hidden; in order to fix the issue. It works, but just an odd little nuisance that might help fellow Dashboard developers. Regression? Maybe.

While on the subject of the MLB Schedule widget, it was featured as one of Niall Kennedy’s Ten Useful Dashboard Widgets on Engadget. And he’s even a Giants fan. Awesome. http://www.engadget.com/2007/07/07/enwidget-ten-useful-apple-dashboard-widgets/



Widgets for the Masses

So TUAW got a look at the MLB Schedule Widget today with this blog post. And then it made my web stats to do this, courtesy of Mint:

TUAW and Mint Stats
Things have tapered off, but right at 1:30 when it was posted, there were a ton of hits. So that’s pretty cool. I’ve gotten some great feedback about both of the widgets and it seems that, overall, people pretty much enjoy them.



Dashboard Widgets and Python

So over the last week, I’ve had some fun with Dashboard Widgets and using Dashcode to do so. I was less-than-impressed when using Dashcode, just because there are a handful of tiny little quirks that don’t work correctly. Hopefully this stuff is fixed in the Leopard release. Anyways, you can see the result of the work under the Widgets tab in the site navigation.

MLB StandingsI created two Major League Baseball themed widgets. The first, MLB Standings, just displays the division standings for any of the 6 baseball divisions. It’s pretty basic, but it’s great to have quick access to. It’s actually something that I’ve wanted to create for a while now, but more on that later. The second widget, MLB Schedule, displays a five-day range centering around today and details either the score of a finished game or the time and TV station of a yet-to-be-played game. It was a little tougher to create, but turns out to be quite handy. I’ve got a few more features to add, too. I want to be able to choose how many days are shown in MLB Schedule, between 3, 5, 7 and 9. But, resizing the widget to fit requires more work in the way of background images. And I’ve also already added support for multiple instances.

The way these widgets work is actually pretty interesting. I did some searching around a while ago for an RSS feed or some XML page which updates with baseball information, but found absolutely nothing. (I’m still disappointed that this doesn’t exist.) So, in order to get this working, the widgets would have to parse a standard HTML page; screen scraping as it’s called. Although I am slightly familiar with screen scraping (using PHP, it’s how I display the download count for my applications on Macupdate and Version Tracker), I couldn’t find a Javascript based code base to start from. It seemed that the language just wasn’t meant for it.

MLB Schedule

And then, I learned Python and it’s amazing. I’ve already written a handful of scripts that were easy to write and fun to play with (which I’ll probably post later). And since every installation of Tiger comes with Python installed, it’s acceptable to use in the widgets. So there are Python scripts in each of these widgets, which do the actual parsing of ESPN webpages and pass all of the data back to the widget’s Javascript, where it is formatted for outputting. The scripts are simple enough and were fairly easy to write, so it’s a great combination.

Then, last night, I came up with another great way to use Python and Dashboard widgets, but in a slightly different way. Last christmas, my folks bought me a Slingbox that they keep at their house in the San Francisco Bay Area, allowing me to watch their DirecTV box from my house. It’s great because I don’t get San Francisco Giants games on local television, so I can watch them there.

One of the issues we have with the Slingbox is determining if my parents can use the television or if I’m watching it remotely. I believe there is a light on the physical box indicating one way or the other, but ours is hidden away, so that doesn’t help. So, what I did was write a small Python script that runs on my machine, the server in this scenario. It checks to see if my SlingPlayer application is open and posts to loganrockmore.com/slingbox a date/time stamp of the last check and a 0 or 1, based on if I’m watching or not. Here’s the script:

#! /usr/bin/python

# upload the status of wether the SlingPlayer application is open to the server

from commands import getoutput
from ftplib import FTP
from datetime import datetime

# see if SlingPlayer is running
if 0 < len( getoutput("ps -ax | grep [S]lingPlayer") ):
    status = 1
else:
    status = 0

# create status file
file = open("/tmp/slingboxstatus", 'w')
file.write( str(datetime.today()) + "n" + str(status) )
file.close()
file = open("/tmp/slingboxstatus")

# ftp the status to the server
ftp = FTP('ftp.loganrockmore.com')
ftp.login('##loginname##', '##password##')
ftp.storlines("STOR index.html", file)

Using unix’s crontab functionality, I’ve set it up to run every ten minutes, so I don’t even have to think about it. It can easily be done by opening a Terminal window, entering crontab -e, entering in the line */10 * * * * /Users/logan/Scripts/slingbox.py in the text editor, saving, and then running crontab -l to verify the changes. (The only thing I’m concerned about is wether FTPing every 10 minutes to my server is really a good idea.)

Slingbox WidgetThen, I created a very small Dashboard widget, which simply checks that status. Every time the Dashboard is open, the widget gets the information from online, formats it and prints it out. So, my parents can run this widget on their Mac and quickly check if I’m watching the Slingbox or not. You can download the widget in this zip file. So, yeah. Pretty cool stuff.




:: RSS Feed :: Archive :: Categories :: Admin