Sha256: 7ae564cc2a69e2ff64421ce35751ee7a49456a49edc5cf771ab4cdaa63242277
Contents?: true
Size: 1.08 KB
Versions: 1
Compression:
Stored size: 1.08 KB
Contents
require "thor" require "active_support/core_ext/numeric/time.rb" require "tlapse" require "tlapse/cli/alpha" module Tlapse::CLI class CLI < Thor desc "doctor", "Perform checks to see if you're ready to tlapse" def doctor Tlapse::Doctor.doctor end desc "version", "Print the version number and exit" def version puts Tlapse::VERSION end desc "capture_single", "Capture a single photo, saving it to the current directory" def capture_single Tlapse::Capture.capture_single end desc "until_sunset", "Generate a gphoto2 command to capture photos from now until the sun sets (useful for cronjobs)" option :interval, desc: "The interval (in minutes) at which picturs will be taken", type: :numeric, default: 5, aliases: %i(i) def until_sunset interval = options[:interval].minutes puts Tlapse::Capture.timelapse_command_while_sun_is_up(interval: interval) end desc "alpha", "Get early access to in-development (and likely unstable) commands" subcommand "alpha", Tlapse::CLI::Alpha end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tlapse-0.7.0 | lib/tlapse/cli/cli.rb |