2025-01-21 21:17:56 +08:00
|
|
|
module uahgi
|
2025-01-21 23:46:40 +08:00
|
|
|
include("./parsing.jl")
|
|
|
|
using .Parsing
|
|
|
|
using ArgParse
|
2025-01-21 21:17:56 +08:00
|
|
|
|
2025-01-21 23:46:40 +08:00
|
|
|
function parse_commandline()
|
|
|
|
#= please see:
|
|
|
|
https://carlobaldassi.github.io/ArgParse.jl/stable/
|
|
|
|
=#
|
|
|
|
s = ArgParseSettings()
|
2025-01-21 21:17:56 +08:00
|
|
|
|
2025-01-21 23:46:40 +08:00
|
|
|
@add_arg_table! s begin
|
|
|
|
"FILE"
|
|
|
|
help = "the file path to be converted."
|
|
|
|
required = true
|
|
|
|
end
|
|
|
|
|
|
|
|
return parse_args(s)
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
function main()
|
|
|
|
parsed_args = parse_commandline()
|
|
|
|
file_path = parsed_args["FILE"]
|
|
|
|
file_content = open(f->read(f, String), file_path)
|
|
|
|
Parsing.parse(file_content)
|
2025-01-21 21:17:56 +08:00
|
|
|
end
|
2025-01-21 23:46:40 +08:00
|
|
|
|
|
|
|
main()
|
|
|
|
end
|
|
|
|
|