Merge branch 'gsl-setup'

This commit is contained in:
Sebastian Thiel
2015-03-01 09:28:33 +01:00
2 changed files with 20 additions and 1 deletions

19
etc/Makefile Normal file
View File

@@ -0,0 +1,19 @@
.PHONY: json-to-xml clean
CONVERT = ./json2xml.py
API_JSON_FILES = $(shell find . -type f -name '*-api.json')
API_XML_FILES = $(patsubst %.json,%.xml,$(API_JSON_FILES))
help:
$(info Valid targets are:)
$(info json-to-xml - convert json API files to xml for consumption by GSL)
json-to-xml: $(API_XML_FILES)
%.xml: %.json
$(CONVERT) --pretty -o $@ < $<
clean:
-rm $(API_XML_FILES)

View File

@@ -275,7 +275,7 @@ def main():
if (options.out):
file = open(options.out, 'wb')
file.write(out)
file.write(out.encode('utf-8'))
file.close()
else:
print(out.encode('utf-8'))