#!/usr/bin/env ruby require 'optparse' require 'todidnt' options = {:path => '.'} command = ARGV.shift ARGV.options do |opts| opts.on('-p', '--path PATH', 'Git directory to run Todidnt in (default: current directory)') do |path| options[:path] = path end opts.on('-d', '--date STRING', 'Fuzzy string for overdue date comparison, e.g. last week or 7/2/2013 (default: today)') do |date| options[:date] = date end opts.on_tail('-h', '--help', 'Show this message') do puts opts exit end opts.parse! end Todidnt::CLI.run(command, options)