6

Get XKCD fix

Posted in Images by zeroflop 405 days ago

There seems to be a python script out there that gets the current XKCD comic and displays it for geektool. It seemed too complicated to implement and required additional applications.

These three scripts work together to get the current XKCD. The scripts only run once a day to prevent overly querying the site. The comic changes less then that so no problem there.

  1. getXKCD Gets the web page for the current comic and saves it to the tmp directroy. It then extracts the URL for the image and grabs the image and saves it to the tmp directroy.

  2. showXKCD then simply shows the local image file. (This could be avoided if the Image geeklet could run script and then grab the image defined on the return URL. Maybe something for the next version of geektool ;))

  3. getTextXKCD gets the alt text from the image.

Enjoy

Geeklet files to download

Comments

Log in to comment or register here.