2012-05-23

Scattered about my home are lists of things to do. The first thing to do on quite a few of these todo lists is: Find the old todo list

Since I would sometimes spend more time looking for a missing list than I would spend actually doing something on the list, putting things to do on a piece or paper is a very inefficient way to keep track of what I need to do.

Fortunately, one of my federated status.net buddies told me about MyTinyToDo; a sweet todo list that one can install on their own server if they happen to know how to do such things. As it happens, I have such skills.

A few minutes of tinkering and a new subdomain later, my todo list went from being a scattered collection of paper to a nice tidy website that I can access from almost anywhere. awesome sauce!

But how will I know how many things are on my todo list if I don't have the list opened in a browser window? Good question, I'm glad I asked it.

MyTinyToDo can be configured to provide an RSS feed of a list and I decided to get a binary representation of the number of unfinished items on the list from the RSS feed. A short Ruby script does this quite well.

Enter The Ruby

#!/usr/bin/env ruby

#we need to read from a uri
require 'open-uri'
#we will need to parse xml
require 'rexml/document'

uri "http://todo.jezra.net/feed.php?list=1"
begin
  #read the xml data from the feed
  xml_data open(uri).read()
rescue
  puts "failed to read text from #{uri}"
  exit
end

#parse the XML
doc REXML::Document.new(xml_data)

uncompleted_item_count 
#loop through the "items" in the feed
doc.elements.each('rss/channel/item'do |i|
  uncompleted_item_count+=unless /Completed: / =~ i.elements['description'].text
end

binary =  "%b" uncompleted_item_count
leds binary.reverse.ljust(6,"0")
p leds

For more information about the machine that displays the number of items on the list, check out http://www.jezra.net/blog/LEDs_BeagleBone_and_my_ToDo_List

Now I need to find a missing key. Rock on, and go make some copies of your keys.

Comments
Name:
not required
Email:
not required (will not be displayed)
Website:
not required (will link your name to your site)
Comment:
required
Please do not post HTML code or bbcode unless you want it to show up as code in your post. (or if you are a blog spammer, in which case, you probably aren't reading this anyway).
Prove you are human by solving a math problem! I'm sorry, but due to an increase of blog spam, I've had to implement a CAPTCHA.
Problem:
2 minus 0
Answer:
required
subscribe
 
2019
2016
2015
2014
2013
2012
2011
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008