2010/10/15

In which one adds a regularly updated snapshot of a web page to his desktop

On the 42nd day of a streak in calendar about nothing I simply forgot to do and commit something. After a new streak was well underway, I decided to add a snapshot of the page to my Mac desktop, so as to try and ward off another lapse. A quick google search found CutyCapt, a Qt & Webkit based program available as a Windows binary or as source code. As I already had installed Qt, Xcode and GeekTool, I decided to use the source code rather than look for something simpler to install.

GeekTool is a very practical app for Mac OS that allows you to display images, text files or shell scripts result in a layer between your desktop image and your desktop icons.

Here is what the combination of the above can look like :

Geektool + calendar about nothing - All the crap usually lying around on the desktop have been moved to the 'all my stuff' folder for this posed screenshot.

If you are not interested in installing Qt, Xcode and compiling random source files, you can download CutyCapt in binary form for mac and skip to the GeekTool setup. Or you can build it from source. For that option, you need to use the Terminal, and already have Xcode and Qt installed.

How to build CutyCapt (once you have all the prerequisites installed):

  • Download and untar the CutyCapt sources from the website (scroll down).
  • In the Terminal, cd to the directory extracted from the archive and run qmake (no option), which will generate the Xcode artefacts.
  • Compile the Mac binary by running xcodebuild (no option either). The binary will be in the newly created CutyCapt.app/Contents/MacOS/* directory. You can copy it to some shorter path if you want.

Setting the image on the desktop :

The following setup will download your calendar page and wait 5 seconds for the scripts and css to execute, render the result, and repeat this every hour (the echo 'last updated the image on :';date; part it to see when the command was executed last).

  • Install GeekTool
  • In the GeekTool preference pane, drag a Shell widget to your desktop, for calling the CutyCapt.
  • In the Command field, put, all in one line, echo 'Last updated the calendar snapshot on :' ;date ;{path/to/CutyCapt/binary}/CutyCapt --url=http://calendaraboutnothing.com/~{your github account} --delay=5000 --out={somewhere/on/your/machine}/calendaraboutnothing.png.
  • Set the Refresh to 3600 seconds.
  • In the GeekTool preference pane, drag an Image widget to the desktop.
  • In its option, click "Set local path" and select the image generated by the script setup above (GeekTool will refresh the image when it notices that the image has been updated).
  • Done.

The image will be rendered every hour on you desktop. Once you’re done for the day, you can de-activate this group in the GeekTool menubar menu.

 
Archives / RSS
— ~ —