quest-reader/Program.cs

22 lines
522 B
C#
Raw Permalink Normal View History

2022-02-15 18:38:47 +00:00
using QuestReader.Services;
using System.CommandLine;
2022-02-15 18:38:47 +00:00
var command = new RootCommand
{
Name = "quest-parser",
Description = "A tool to archive quest threads",
TreatUnmatchedTokensAsErrors = true
};
var questNameArg = new Argument<string>(
"questName",
"Quest name to use for loading files and generating"
);
command.AddArgument(questNameArg);
command.SetHandler((string questName) => {
var generator = new Generator(questName);
generator.Run();
}, questNameArg);
return command.Invoke(args);