morloc icon indicating copy to clipboard operation
morloc copied to clipboard

Feature Request: standard input

Open j23414 opened this issue 4 years ago • 2 comments

Might be nice to accept standard input if the function takes a single argument, or use '-' to stand in for standard in?

j23414 avatar Dec 08 '19 21:12 j23414

Good point. I'll try to add this in the next release, probably in a couple weeks.

arendsee avatar Dec 08 '19 21:12 arendsee

I haven't forgotten this. I'll try to add when I get around to starting a UI-centered dev-cycle.

arendsee avatar Dec 15 '20 23:12 arendsee

Commands can now take JSON files as inputs rather than raw JSON strings. So now you can use standard input by reading from the /dev/stdin file. This will allow you to pass the output of one morloc program to a second morloc program as a positional argument.

This does not exactly address your issue, though. The files morloc accepts must be JSON files that specify a morloc object. Files are assumed to be structured. So piping arbitrary strings into morloc will not work. You can write your entire pipeline as a morloc composition, though. Part of the reason for creating morloc was to replace brittle Bash scripting.

arendsee avatar Feb 17 '24 15:02 arendsee