#!/usr/bin/env ruby

$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)

require "bundler/setup"
require "optparse"
require "processor"

Options = Struct::new(:source, :target)

class Parser
  def self.parse!
    args = Options.new

    opt_parser = OptionParser::new do |opts|
      opts.banner = "Eighty static website builder (Asciidoc processor)"
    end

    opt_parser.parse!
    args
  end
end

options = Parser.parse!
options.source = ARGV[0]

raise "Source not set" unless options.source

Processor.process(options.source)
