aboutsummaryrefslogtreecommitdiff
path: root/bin/json2yaml.rb
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <msabate@suse.com>2018-01-27 17:50:32 +0100
committerMiquel Sabaté Solà <msabate@suse.com>2018-01-27 17:50:32 +0100
commitc40ec295f9a4267f5678ec521fd72b963d4b9264 (patch)
treedd945dbf0104d4223543ffb429dd5337377e8bf2 /bin/json2yaml.rb
parent53adf9d5a1a451079408548b714ad7b89936ab20 (diff)
downloaddotfiles-c40ec295f9a4267f5678ec521fd72b963d4b9264.tar.gz
dotfiles-c40ec295f9a4267f5678ec521fd72b963d4b9264.zip
bin: added json2yaml.rb
This is a simple ruby script that outputs a JSON input as YAML. Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>
Diffstat (limited to 'bin/json2yaml.rb')
-rwxr-xr-xbin/json2yaml.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/bin/json2yaml.rb b/bin/json2yaml.rb
new file mode 100755
index 0000000..4f77f8b
--- /dev/null
+++ b/bin/json2yaml.rb
@@ -0,0 +1,6 @@
+#!/usr/bin/env ruby
+
+require 'json'
+require 'yaml'
+
+puts JSON.parse(ARGF.read).to_yaml