Cafeget

a Dashboard Widget to check your Cafepress.com Revenues.

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

Cafeget Widget Screen Shot

Last modified: June 20 2008 16:41:08

Update: Jun 11, 2007. Fixed display error due to minor format change in CafePress earnings report.

Update: Dec 29, 2005. Created a second, partner widget for Spreadshirt users, called "Spreadget" (pronounced spread-jet). It's basically identical to Cafeget. You can read about it and download it here.

Update: Dec 15, 2005. Really fixed the "[Store+Affiliate]" line, for real this time, I think.

Update: Dec 14, 2005. New version with minor improvements (thanks to the members of the Cafepress Message Boards for testing and making suggestions/corrections.)

  • Displays account email address in main window
  • Removes "[store and affiliates]" line if present, to correct text flow (someone please confirm this for me; mine never showed that)
  • Better filenaming for multiple accounts, BUT, still need to resolve widget framework's preferences storage method to avoid race condition with multiple accounts

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

    Download: Click here. (zip format)

    Cafeget 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 Cafepress username (email address) and password and click Done.
  • In a few seconds (depending on your network connection), you should see your totals.



    Multiple accounts:

  • two Cafeget widgets watching two Cafepress accountsBring up Dashboard and click the "+" in the lower left-hand corner, to manage widgets.
  • Click Cafeget, again. Iit will appear right in the center of the screen, possibly covering up a previous instantiation of Cafeget.
  • 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 Cafeget 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 Cafeget. If you're not familiar with those things, the basic idea is:

  • Cafeget makes a connection to Cafepress.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.
  • Cafeget 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 Cafepress.com's login and sales report web pages are formatted. If those ever change, CafeGet 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.)
  • Feature request: "The bulk of my $ is affiliate sales and I would love to have a quick way to see this info:
    From affiliate report- earnings
    # orders / $ revenue from today

    From inside the sales report/shop
    # of orders from today (combined from all shops)

    Licensing: Feel free to use/redistribute/modify Cafeget. It is my first Widget and was basically a way to learn how to make Widgets. 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.

    Thanks for your interest. -- Marion