3
0
Fork 0
This repository has been archived on 2022-01-17. You can view files and clone it, but cannot push or open issues/pull-requests.
recipes-parser/debug.cr

23 lines
425 B
Crystal

require "option_parser"
require "./src/spec"
recipe_file_name = "some-non-existant-file"
OptionParser.parse! do |parser|
parser.on "-f file", "--file file", "File to parse." do |f|
recipe_file_name = f
end
parser.on "-h", "--help", "Show this help" do
puts parser
exit 0
end
end
options = Hash(String,String).new
options["someoptionexample"] = "option"
specs = Specs.parse recipe_file_name, options
pp! specs