From 33c65a2afccb8031e5c929498cdbdb6c83bb645e Mon Sep 17 00:00:00 2001 From: cracyc Date: Fri, 2 Jun 2017 17:59:55 -0500 Subject: plugins/cheat: add hotkey support [Carl] --- plugins/cheat/xml_to_json.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 plugins/cheat/xml_to_json.lua (limited to 'plugins/cheat/xml_to_json.lua') diff --git a/plugins/cheat/xml_to_json.lua b/plugins/cheat/xml_to_json.lua new file mode 100644 index 00000000000..1273fb9885e --- /dev/null +++ b/plugins/cheat/xml_to_json.lua @@ -0,0 +1,11 @@ +xml = require("cheat_xml") +json = dofile("../json/init.lua") + +function readAll(file) + local f = io.open(file, "rb") + local content = f:read("*all") + f:close() + return content +end + +print(json.stringify(xml.conv_cheat(readAll(arg[1])), {indent = true})) -- cgit v1.2.3-70-g09d2