ForumsTips & TricksCommand line client in Ruby available


Command line client in Ruby available
Author Message
will.sargent

Posted: Mar 12, 2008
Score: -1 Reference
I would like to take this opportunity to plug my little ruby gem.

http://toodledo.rubyforge.org

Will.
will.sargent

Posted: Mar 29, 2008
Score: -1 Reference
How to print out tasks arranged by context:

require 'rubygems'
require 'toodledo'
require 'yaml'

# Look for a file called $HOME/.toodledo/user-config.yml and read it in
HOME = ENV["HOME"] || ENV["HOMEPATH"] || File::expand_path("~")
TOODLEDO_D = File::join(HOME, ".toodledo")
CONFIG_F = File::join(TOODLEDO_D, "user-config.yml")
config = YAML.load(IO::read(CONFIG_F))

# This will work if you don't want to go through yaml
#config = {
# "connection" => {
# "url" => "http://www.toodledo.com/api.php",
# "user_id" => "<your user id>",
# "password" => "<your password>"
# }
#}

Toodledo.set_config(config)
Toodledo::begin do |session|
session.get_contexts().each do |context|
criteria = { :folder => 'Action', :context => context, :notcomp => true }
tasks = session.get_tasks(criteria)
puts "#{context.name}" if (! tasks.empty?)
tasks.each { |task| puts " #{task.title}" }
end
end
patricko

Posted: Jul 22, 2008
Score: -1 Reference
Hey Will - Thanks for this great resource. I'm not able to figure out how to specify a due date when using "toodledo add". Has that functionality been implemented?

Thanks,
Patrick
will.sargent

Posted: Jul 23, 2008
Score: -1 Reference
There's no way to add a due date currently through the command line client. You could tweak the parser, or you could leverage the library and write a custom ruby script that parses a date...
You cannot reply yet

U Back to topic home

R Post a reply

To participate in these forums, you must be signed in.