Spreadget

a Dashboard Widget to check your Spreadshirt.com Revenues.

Spreadget is a Mac OS X Tiger Dashboard widget that logs in to your Spreadshirt.com account, retrieves your sales totals, and displays them in a small, unobtrusive, fast-loading box in your Dashboard.

Spreadget Widget Screen Shot

Last modified: January 29 2012 07:10:09

Please email spreadget@whoopis.com with any errors or suggestions.

Download: Click here. (zip format)

Spreadget login screen Installation and usage:

Mac OS X 10.4 Tiger is required. If you're using Safari, click the download link. When the widget download is complete, show Dashboard, click the Plus sign to display the Widget Bar and click the widget's icon in the Widget Bar to open it. If you're using a browser other than Safari, click the download link. When the widget download is complete, unarchive it and place it in /Library/Widgets/ in your home folder. Show Dashboard, click the Plus sign to display the Widget Bar and click the widget's icon in the Widget Bar to open it.

  • UnStuff the archive and double-click the widget to install
  • Click "yes" to keep it
  • Mouse down to the lower right-hand corner and click the tiny "i" that appears
  • Enter your Spreadshirt username (email address) and password and click Done.
  • In a few seconds (depending on your network connection), you should see your totals.



    Multiple accounts:

  • Bring up Dashboard and click the "+" in the lower left-hand corner, to manage widgets.
  • Click Spreadget, again. Iit will appear right in the center of the screen, possibly covering up a previous instantiation of Spreadget.
  • It will by default repeat your existing account info. Click the little "i" in the lower right-hand corner of the widget, and enter your other account login/pass and then you can view both at once.
  • Rinse, lather, repeat for other accounts.



    Troubleshooting: If Spreadget fails to display your sales data, try the following things:

  • Check/re-enter your username/password
  • Hit the F12 key a couple times to refresh the Dashboard
  • Delete the widget from your /Users/username/Library/Widgets/ folder and reinstall it
  • email me.

    How does it work? Widgets are basically tiny websites with some hooks into OS X's Dashboard framework; if you're familiar with Unix and PHP, you'll easily see what's going on in Spreadget. If you're not familiar with those things, the basic idea is:

  • Spreadget makes a connection to Spreadshirt.com and simulates a web browser login session with the email address and password you provide. The login info is saved in a cookies file inside the widget.
  • Spreadget then asks for the sales report page, which it saves as a raw HTML file.
  • A php script then parses that HTML data and extracts the sales data.
  • Those data are then reformatted and displayed in a custom window.

    If you want to see the hairy details, right-click or control-click on the widget and choose "Show Package Contents".

    Notes/caveats: The functionality of this widget is entirely dependent on the way Spreadshirt.com's login and sales report web pages are formatted. If those ever change, SpreadGet will break. And then I will fix it...or at least, try to. ;)

    To do:

  • Resolve occasional race condition with multiple account display (one overwrites the other; need to use unique filenames for downloaded content)
  • "Large Print" version
  • Better error reporting (e.g. if account info is invalid)
  • Port to Konfabulator framework, for PC users -- maybe! I don't know anything about Konfabulator yet. (Anyone want to help? Email me.)

    Licensing: Feel free to use/redistribute/modify Spreadget. If you come up with code improvements (VERY likely; the parsing is done in a silly way), then please let me know; if I make the improvements, I will credit you.

    Credits: Julien Genestoux, creator of WidSense, which acted as my template for CafeGet and Spreadget.

    Thanks for your interest. -- Marion