You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not very comfortable with parsing the commands sent to the bot with regexps, maybe using a lib like picocli could be a better option for this: https://picocli.info/#_example_application
The text was updated successfully, but these errors were encountered:
Actually, it won't spend me doing a little bit of parsing:
I have to determine which kind of listener is concerned ("!jira", "!odoo", ...)
I need to figure out the subcommand ("issue", "worklog", ...) to give the expected class representing the command being sent by the user:
[...]
def jira = new JiraIssueCmd()
def msg = "!jira issue GEO-1234".split(" ")
if (msg[0] == "!jira") {
def parsed = new CommandLine(jira).parseArgs(msg[1..-1] as String[])
}
// then if (msg[1] == "... whatever subcommand") ?
println msg[1..-1]
println jira.issueId
println jira.command
Then maybe having to fiddle with try/catches to properly handle errors.
although picocli is interesting, the formalism is IMHO too strict: I want to chat with my bot, if I would have wanted a "over slack shell interface", it would have sounded relevant.
I'm not very comfortable with parsing the commands sent to the bot with regexps, maybe using a lib like picocli could be a better option for this:
https://picocli.info/#_example_application
The text was updated successfully, but these errors were encountered: