Skip to content
Browse files

Remove bundler, because it seems to crash macruby :(

  • Loading branch information...
1 parent 467e7d8 commit 094647c37990e629e8057de9396f21859986d3c3 @cschneid committed
Showing with 32 additions and 2 deletions.
  1. +3 −0 Gemfile
  2. +10 −0 Gemfile.lock
  3. +19 −2 omnifocus.rb
View
3 Gemfile
@@ -0,0 +1,3 @@
+source :rubygems
+
+gem 'trollop'
View
10 Gemfile.lock
@@ -0,0 +1,10 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ trollop (1.16.2)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ trollop
View
21 omnifocus.rb
@@ -1,3 +1,6 @@
+require "rubygems"
+require 'trollop'
+
framework 'Foundation'
framework 'ScriptingBridge'
@@ -173,7 +176,21 @@ def print_node(node, print_method, nesting_level)
end
end
+opts = Trollop::options do
+ version "0.01 (c) 2012 Chris Schneider"
+ banner <<-EOS
+Command Line Interface to Omnifocus
+
+Usage:
+ omnifocus.rb [options]
+
+where [options] are:
+EOS
+
+ opt :contexts, "Display Contexts"
+ opt :folders, "Display Folders"
+end
-puts OmnifocusCLI::Presenters::NestedPresenter.new.display(:contexts)
-puts OmnifocusCLI::Presenters::NestedPresenter.new.display(:folders)
+puts OmnifocusCLI::Presenters::NestedPresenter.new.display(:contexts) if opts[:contexts]
+puts OmnifocusCLI::Presenters::NestedPresenter.new.display(:folders) if opts[:folders]

0 comments on commit 094647c

Please sign in to comment.
Something went wrong with that request. Please try again.