Sha256: 744f12f8cedc1898c1853c81db0dec4011a370af729915b28e20e53f20d5473e

Contents?: true

Size: 699 Bytes

Versions: 2

Compression:

Stored size: 699 Bytes

Contents

module Spielbash
  module CLI
    require 'gli'

    include GLI::App
    extend self

    program_desc 'Tool to automate bash movie-making with asciinema. Be the Spielberg of bash'

    desc 'Be verbose'
    switch [:v, :verbose]

    # pre do |global_options, command, options, args|
    # end

    desc 'Create a recording'
    command :record do |c|
      c.desc 'Script file path'
      c.flag [:script]
      c.desc 'Output file'
      c.flag [:o, :output]

      c.action do |_, options, _|
        script_path = options[:script]
        output_path = options[:output]
        Spielbash::RecordInteractor.new().execute(script_path, output_path)
      end
    end

    exit run(ARGV)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
spielbash-0.1.1 lib/spielbash/view/cli.rb
spielbash-0.1.0 lib/spielbash/view/cli.rb