Giter Club home page Giter Club logo

xkcd-fan's Introduction

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.

xkcd-fan's People

Watchers

Pierre Haufe avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.