Skip to content
forked from anler/xkcd-fan

Fetchs a random comic from xkcd's website

Notifications You must be signed in to change notification settings

phaufe/xkcd-fan

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

About


This is a little program that when invoked with a given directory path as its parameter, it fetchs a random comic from xkcd's website and saves it into that directory. I use it in my Mac in conjunction with GeekTool and Automator to set a random comic as my desktop's background each time I do a system reboot.

My desktop

Installation


  1. Install GeekTool
  2. Download xkcd_fan.py script
  3. Open GeekTool and create an Image Geeklet in your desktop. Set URL to the directory where you will save the comics and check Pick random image in directory

With that in place, all that's left to do is create an Automator application:

  1. Open Automator and choose new Application workflow
  2. Drag a "Run Shell Script" action to the workflow area in the right
  3. Set the Shell drop-down to /bin/bash and the Pass Input drop-down to as arguments
  4. Clear the text in the text box and write something like this (but using your own paths): /path/to/python3 /path/to/xkcd_fan.py /destination/directory
  5. Save it and test it running it clicking in the play button in the up-right corner
  6. Then, from the System Preferences >> User & Groups >> Login Items click in the + button and navigate to and select your new Automator application.

TODO


Only compatible with Python 3 right now but is not particulary hard adapt it so that works in Python 2 too.

About

Fetchs a random comic from xkcd's website

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published