Sha256: 6d870d6f15441dc6f6761e17293565510f9b0014a800b3e69e9b5ed5f9363746
Contents?: true
Size: 406 Bytes
Versions: 2
Compression:
Stored size: 406 Bytes
Contents
#!/usr/bin/env ruby require 'sablon' require 'json' if ARGV.size != 2 puts <<-HELP cat <context path> | sablon <template path> <output path> HELP exit end template_path = File.expand_path(ARGV[0]) output_path = File.expand_path(ARGV[1]) context_json = STDIN.readlines.join context = JSON.parse(context_json) template = Sablon.template(template_path) template.render_to_file(output_path, context)
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
sablon-0.0.5 | bin/sablon |
sablon-0.0.4 | bin/sablon |