'rufus-rtm', yet another ruby gem

9 views
Skip to first unread message

John Mettraux

unread,
Feb 14, 2008, 5:42:45 AM2/14/08
to remembert...@googlegroups.com
Hi,

I've just released 'rufus-rtm', a Ruby gem for "Remember The Milk".
The license is MIT.

It's at version 0.1 and is pretty limited for now, but you can already
list, add and complete tasks.


The details are at : http://rufus.rubyforge.org/rufus-rtm


A bit of info :


== getting it

sudo gem install -y rufus-rtm


== usage

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!


Best regards,

--
John Mettraux -///- http://jmettraux.openwfe.org

Reply all
Reply to author
Forward
0 new messages