Fork me on GitHub
#off-topic
<
2021-08-24
>
lgessler03:08:40

anybody got recs for a jvm command line args library? I want to add some simple flags (like -h and --version) to my production uberjar, maybe some commands too

seancorfield04:08:20

@U49U72C4V I was about to recommend that (caveat: I maintain it).

πŸ‘ 3
lgessler04:08:08

it looks awesome! one question: just glancing at docs, I'm not sure how easy it'd be to have a subcommand, e.g. java -jar my.jar command subcommand --subcommand-arg where --subcommand-arg is only valid on the child command, and so on with command other-subcommand --other-subcommand-arg

lgessler04:08:20

it kind of seems like it might be possible to use subparsers to achieve this--have you run into this before?

seancorfield04:08:17

@U49U72C4V That sounds familiar. Let me see if there was a ticket about that...

lgessler04:08:13

oh that's exactly what I want! thanks πŸ™‚

seancorfield04:08:04

I inherited cli so it has a long history before me but I gather POSIX arg parsing compliance was a core goal so...

lgessler04:08:03

that's very good, i'm sure the rest of the software world will catch up and be POSIX compliant soon

seancorfield05:08:40

Given the push for exec fns and EDN key/value arguments in the Clojure world, I wouldn't be too sure about that πŸ™‚

borkdude06:08:24

Also checkout nubank docopt which supports subcommands. It’s based on tools.cli, also works with babashka

πŸ™Œ 2
bherrmann01:08:49

see http://docopt.org/ basically - you write the usage - and docopt does the parsing and gives you a map with the results.

javi08:08:07

anyone can recommend an rtf to html library? clojure/java/node …

Ben Sless09:08:48

Why not use pandoc?

javi18:08:36

i lol give it a try, thanks!

πŸ‘ 3
javi18:08:33

β€œi’ll” not β€œlol”

πŸ™ƒ 3