Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

+ Archives an area of todos

  • Loading branch information...
commit d381ff49e92325d3a170ce979cffea74ff6d5f37 1 parent 448776e
@kschiess authored
Showing with 17 additions and 0 deletions.
  1. +17 −0 rb/archive_things/archive_area.rb
View
17 rb/archive_things/archive_area.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.