mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-01-06 11:34:34 +01:00
Merge branch 'gsl-setup'
This commit is contained in:
19
etc/Makefile
Normal file
19
etc/Makefile
Normal 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)
|
||||
|
||||
@@ -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'))
|
||||
|
||||
Reference in New Issue
Block a user