bin/tlapse in tlapse-0.0.3 vs bin/tlapse in tlapse-0.0.6

- old
+ new

@@ -1,19 +1,29 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby -require "slop" +require "gli" require "byebug" + require_relative "../lib/tlapse" -opts = Slop.parse do |o| - o.on "-v", "--version", "print the version" do - puts Tlapse::VERSION - exit +include GLI::App +include Tlapse + +program_desc "Automated time lapse photography via gphoto2" +version Tlapse::VERSION + +desc "Determine whether you are ready to start capturing" +command :doctor do |c| + c.action do |global_options,options,args| + doctor end +end - o.on "-h", "--help", "print this dialog" do - puts o - exit +desc "Capture a single photo, saving it to the current directory" +command :single do |c| + c.action do |global_options,options,args| + capture_single end end -puts opts +exit run(ARGV) +