Closed gaberger closed 2 years ago
Hi, thanks for your comment. I am not sure how that is supposed to work - like, how would you use it?
In general, if you have a type of :jsonfile
, Cli-matic will read the file and convert it to a Clojue data structure.
As for stdin, you could use /dev/stdin
but if you have something that is easier to use I'd love to add it.
As a side note, Graal is definitely a game changer - though I personally have not had much success playing with it. But I only tried once on some VMs and noticed it was taking forever.
BTW, as for GraalVM, have a look here: https://github.com/l3nz/cli-matic/issues/29 💡
Apropos of GraalVM - see https://www.astrecipes.net/blog/2018/07/20/cmd-line-apps-with-clojure-and-graalvm/
I am not sure about stdin, as stdin is a file, so you can use it as /dev/stdin
as a normal file (and if you want, it could be the default for a parameter, so you do not actually specify it).
Maybe we could use "-", so that it gets expanded to /dev/stdin
or whatever it is when on Windows?
Hi there, do you think it is sufficient to add stdin support for :slurp
? I need the feature for a project linked above.
What I added so far is that one can use -
for placeholder when requiring stdin.
What do you think?
Merged
I hacked something together that looks like
where STDIN_INPUT
not very idiomatic, but would be great to incorporate this into cli-matic..
The primary use-case is now that we have GRAALVM we can native-compile CLJ code into binary artifacts to build command-line apps..