bin/pivotal_to_pdf
#!/usr/bin/env ruby
$:.unshift(File.dirname(__FILE__) + '/../lib') unless $:.include?(File.dirname(__FILE__) + '/../lib')
require 'pivotal_to_pdf'
require 'thor'
class PivotalToPdfApp < Thor
desc "story [STORY_IDs]", "print one or more stories specifed by ID into a PDF file. The card will have a color stripe. The color will be green for features, yellow for chores and red for bugs"
def story(story_id, *other_story_ids)
story_ids = (other_story_ids || []).unshift(story_id)
PivotalToPdf::Main.story story_ids
end
desc "current_iteration", "print stories for the current iteration into a PDF file"
def current_iteration
PivotalToPdf::Main.current_iteration
end
desc "iteration ITERATION-NUMBER", "print all the stories for the iteration specified into a PDF file"
def iteration(iteration_number)
PivotalToPdf::Main.iteration iteration_number
end
desc "label LABEL", "print stories for the label specified into a PDF file"
def label(label_text)
PivotalToPdf::Main.label label_text
end
end
PivotalToPdfApp.start