Thursday, August 7, 2008

TodoBG.py

Thanks for the replies to my last post, but none of them really worked for me (too much work). I ended up writing a small Python script that will read the todo.txt and spit out a nicely formatted PNG every 5 minutes. It is my first ever Python script, so there may be some weird things, but I am proud of it :-).

You can get the script here.

I have it setup to start as soon as GNOME starts (in the Sessions), and updating the BG every 5 minutes works for me, but you can change it up in the script if you want it to be slower or faster.

Any questions, comments, or concerns are greatly appreciated!

4 comments:

  1. I guess I'm a late-comer... but here it goes:

    convert -page 1280x800 -font -pointsize 18 text:~/todo.txt ~/todo.png

    check out this page for more fancy options:

    http://www.imagemagick.org/Usage/text/#text

    ReplyDelete
  2. Here's some Python magic for you!

    Instead of "while 1:" you can just do "for line in contents:", which will loop over every line in the file.

    ReplyDelete
  3. I prefer to keep a tomboy note open at all times on my main workspace with my todo list on it (i use the Start Here note as a main todo and make links to develop on items).

    ReplyDelete