Build date in XML

This commit is contained in:
tritoch
2017-07-06 17:49:36 -05:00
parent 5b987d28cf
commit c40355f0fb

View File

@@ -493,8 +493,10 @@ def write_combined_xml(mtgjson, setinfos):
cardsxml = open('out/spoiler.xml', 'w+')
cardsxml.truncate()
cardsxml.write("<?xml version='1.0' encoding='UTF-8'?>\n"
"<cockatrice_carddatabase version='3'>\n"
"<sets>\n")
"<cockatrice_carddatabase version='3'>\n")
cardsxml.write("<!--\n created (UTC): " + datetime.datetime.utcnow().strftime("%a %b %d %H:%M:%S %Z %Y")
+ "\n by: Magic-Spoiler project @ https://github.com/Cockatrice/Magic-Spoiler\n -->\n")
cardsxml.write("<sets>\n")
for setcode in mtgjson:
setobj = mtgjson[setcode]
if 'cards' in setobj and len(setobj['cards']) > 0: