This repository has been archived on 2019-12-12. You can view files and clone it, but cannot push or open issues/pull-requests.
2017-04-22 06:19:17 +00:00
|
|
|
import json
|
|
|
|
import sys
|
|
|
|
|
|
|
|
from pystache import render
|
|
|
|
|
|
|
|
|
|
|
|
def mustache():
|
|
|
|
with open(sys.argv[1], 'r', encoding='utf-8') as f:
|
|
|
|
template = f.read()
|
|
|
|
data = json.loads(sys.stdin.read())
|
|
|
|
sys.stdout.write(render(template, data))
|