Sha256: dcddbbc35ca6bd254c549c9e6afeb38d7b75aa555b7fc32978304c30f83721a2

Contents?: true

Size: 1.11 KB

Versions: 1

Compression:

Stored size: 1.11 KB

Contents

# encoding: utf-8
require 'trollop'
require 'rainbow'
require 'docface/version'

module DocFace
  class Cli

    def opts
      DocFace::Cli.opts
    end

    def self.opts
      opts = Trollop::options do
        version "DocFace version: #{DocFace::VERSION} (c) 2013 Bryan Brandau"
        banner <<-EOS.gsub(/^ {10}/, '')
          #
          #
          # Welcome to DocFace #{DocFace::VERSION}.
          #
          #    (╯°□°)╯︵ ┻━┻
          #

          ** DocFace Commands **
          docface (options)\r

        EOS
        banner <<-EOS.gsub(/^ {10}/, '').color(:cyan)

          Example Usage: docface -d ~/git/chef -o ~/my_build
          For help use: docface --help
        EOS
        opt :dir, "The directories to scan for markdown files", :short => "d", :type => :string, :required => true
        opt :output, "The directory to write the generated output to", :short => "o", :type => :string
        opt :title, "The title of the page", :short => "t", :type => :string
        opt :description, "A custom description for the page", :short => "D", :type => :string
      end
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
docface-0.0.2 lib/docface/cli.rb