diff --git a/doc/tracks_template_cli.rb b/doc/tracks_template_cli.rb index 9be23092..e02c8013 100755 --- a/doc/tracks_template_cli.rb +++ b/doc/tracks_template_cli.rb @@ -145,12 +145,12 @@ module Gtd req.basic_auth ENV['GTD_LOGIN'], ENV['GTD_PASSWORD'] req.body = "#{props}" - puts req.body + puts req.body if options[:verbose] resp = http.request(req) if resp.code == '302' || resp.code == '201' - puts resp['location'] + puts resp['location'] if options[:verbose] # return the todo id return resp['location'].split("/").last @@ -183,7 +183,7 @@ module Gtd resp = http.request(req) if resp.code == '302' || resp.code == '201' - puts resp['location'] + puts resp['location'] if options[:verbose] # return the project id return resp['location'].split("/").last @@ -249,6 +249,10 @@ module Gtd @keywords[v.split("=")[0]] = v.split("=")[1] end + cmd.on('-v', "verbose on") do |v| + @options[:verbose] = true + end + cmd.on('-f [S]', "filename of the template") do |v| @filename = v end