When writing kotlin scripts: How do you parse argu...
# announcements
p
When writing kotlin scripts: How do you parse arguments?
e
c
bookmarks
p
What's your favorite? clikt seems not idiomatic with that runnable stuff. I was really hoping for a data class where I can just call
println(parsed)
while debugging
j
Parsing command line options is half of the work, you also need to document the thing. Help generated from your arguments parser is nice, but I find even nicer to have your parser generated from your documentation! You can use docopt in any language for this and I have a vague project of porting it to kotlin multiplatform http://docopt.org/
d
I chose clikt in the end, it seems like there's many more features.. I just don't like how the context gets passed down to the sub-commands... it seems a bit too boilerplate...
Clikt also produces documentation...
h
#C0BT46EL8