#!/usr/bin/env ruby $LOAD_PATH.unshift(File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib'))) require 'toadie' require 'slop' require 'json' opts = Slop.parse do banner "Toadie, todo grepper, blamer, analyzer\n" on :c, :config, 'Configuration file', :argument => :optional end # puts opts.help # # if ARGV is `--name Lee -v` # opts.verbose? #=> true # opts.password? #=> false # opts[:name] #=> 'lee' config_file = opts[:config] || File.join(Toadie.root, '.toadie.json') if File.exist?(config_file) config = JSON.parse(File.read(config_file)) Array(config["authors"]).each do |attributes| Toadie::Author.create(attributes) end end Toadie::Run.new.start