Sha256: 14bdf4738247c2d0c0e728b5e4bf9fe3f9ae70323a5e39eaf7cf073fa74ef3a5

Contents?: true

Size: 998 Bytes

Versions: 1

Compression:

Stored size: 998 Bytes

Contents

#!/usr/bin/env ruby
$LOAD_PATH.push File.expand_path('../../lib', __FILE__)

require 'optparse'
require 'rubrowser'
require 'rubrowser/renderer'

options = {
  toolbox: true,
  layout: nil,
  output: STDOUT
}

OptionParser.new do |opts|
  opts.banner = "Usage: #{__FILE__} [options] [file] ..."

  opts.on(
    '-oFILE',
    '--output=FILE',
    'output file page, if not specified output will be written to stdout'
  ) { |output| options[:output] = output }

  opts.on(
    '-lFILE',
    '--layout=FILE',
    'layout file to apply on the resulting graph'
  ) { |layout| options[:layout] = layout }

  opts.on('-T', '--no-toolbox', 'Don\'t display toolbox on the page') do
    options[:toolbox] = false
  end

  opts.on('-v', '--version', 'Print Rubrowser version') do
    puts "Rubrowser #{Rubrowser::VERSION}"
    exit
  end

  opts.on('-h', '--help', 'Prints this help') do
    puts opts
    exit
  end
end.parse!

options[:files] = ARGV.empty? ? ['.'] : ARGV

Rubrowser::Renderer.call(options)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rubrowser-2.6.0 bin/rubrowser