# README
Simple Sheens I/O
This program reads messages from stdin
and writes messages to
stdout
. It aspires to be compatible with Little
Sheens's
sheensio
.
Currently the steps
output is very different, but the updated
and
out
lines should be compatible (with the possible exception of JSON
property rendering order from Little Sheens).
Usage
This program expects JSON specs, so you'll need to convert a spec in
YAML to a spec in JSON.
yaml2json
can do that.
go get github.com/bronze1man/yaml2json
cat specs/double.yaml | yaml2json | jq . > specs/double.js
cat<<EOF > crew.json
{"id":"simpsons",
"machines":{
"m1":{"spec":"double.js","node":"start","bs":{}}}}
EOF
echo '{"double":3}' | sheensio
produces
out {"doubled":6}
The JSON on the out
lines is canonical (in the sense that properties
are sorted lexicographically).
Note that the order of processing among machines within a crew is unspecified; therefore, the order of messages emitted by multiple machines is unspecified. If your crew has only one machine, then the order of emitted messages is specified completely by that machine.