processi

about processes and engines

‘rufus-rtm’ remembers the milk

remember the milkI’ve just released version 0.1 of ‘rufus-rtm’, yet another Remember The Milk Ruby gem.

The license is MIT, the features are pretty limited for now but it’s already quite useful (at least to me).

The documentation is at http://rufus.rubyforge.org/rufus-rtm, but here is a usage sample :

    require 'rubygems'
    require 'rufus/rtm'

    #
    # listing tasks

    tasks = Task.find
        # finding all the tasks

    tasks = Task.find :filter => "status:incomplete"
        # finding all the incomplete tasks

    tasks.each do |task|

        puts "task id #{task.task_id}"
        puts "   #{task.name} (#{task.tags.join(",")})"
        puts
    end

    #
    # adding a task

    task = Task.add! "study this rufus-rtm gem"
        # gets added to the 'Inbox' by default

    puts "task id is #{task.task_id}"

    #
    # enumerating lists

    lists = List.find

    w = lists.find { |l| l.name == 'Work' }

    puts "my Work list id is #{w.list_id}"

    #
    # adding a task to a list

    task = Task.add! "work, more work", w.list_id

    #
    # completing a task

    task.complete!

    #
    # deleting a task

    task.delete!

Written by John Mettraux

February 14, 2008 at 10:58 am

Posted in rtm, ruby, rufus