Skip to content

Commit

Permalink
+ Archives an area of todos
Browse files Browse the repository at this point in the history
  • Loading branch information
kschiess committed Apr 30, 2012
1 parent 448776e commit d381ff4
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions rb/archive_things/archive_area.rb
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,17 @@
require 'appscript'

include Appscript
app = app('Things')

fail "First argument to this script should be area name." if ARGV.empty?

project = app.lists["@#{ARGV.first}"].get
project.to_dos.get.each do |todo|
date = todo.completion_date.get
text = todo.name.get
status = todo.status.get
project = todo.project.get != :missing_value && todo.project.get.name.get || '(none)'
tags = todo.tag_names.get

puts [project, text, date, status, tags].join('\t')
end

0 comments on commit d381ff4

Please sign in to comment.