doc/readme
Ruby Usage
File prog.rb
:
require 'yamlscript' input = IO.read('file.ys') ys = YAMLScript.new data = ys.load(input) puts data
File file.ys
:
!YS-v0: name =: "World" foo: [1, 2, ! inc(41)] bar:: load("other.yaml") baz:: "Hello, $name!"
File other.yaml
:
oh: Hello
Run:
$ ruby prog.rb {"foo"=>[1, 2, 42], "bar"=>{"oh"=>"Hello"}, "baz"=>"Hello, World!"}
Installation
You can install this module like any other Ruby module:
gem install yamlscript
but you will need to have a system install of libys.so
.
One simple way to do that is with:
curl https://yamlscript.org/install | bash
> Note: The above command will install the latest version of the YAMLScript
command line utility, ys
, and the shared library, libys.so
, into
~/local/bin
and ~/.local/lib
respectively.
See for more info.