class MiGA::Cli::Action::Browse

Action: miga browse

Public Instance Methods

parse_cli() click to toggle source
# File lib/miga/cli/action/browse.rb, line 7
def parse_cli
  cli.parse do |opt|
    cli.defaults = { open: true }
    cli.opt_object(opt, [:project])
  end
end
perform() click to toggle source
# File lib/miga/cli/action/browse.rb, line 14
def perform
  p = cli.load_project
  create_empty_page(p)
  generate_project_page(p)
  say 'Creating dataset pages'
  cli.load_project.each_dataset do |d|
    generate_dataset_page(p, d)
  end
  generate_datasets_index(p)
  say "Open in your browser: #{File.join(p.path, 'index.html')}"
end