Merge pull request #277 from Cockatrice/tooomm-patch-5

Add XML declaration
This commit is contained in:
ebbit1q 2022-02-05 19:10:51 +01:00 committed by GitHub
commit 32fc4ef4fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -208,7 +208,8 @@ def open_header(card_xml_file: IO[Any]) -> None:
:param card_xml_file: Card file path :param card_xml_file: Card file path
""" """
card_xml_file.write( card_xml_file.write(
"<cockatrice_carddatabase version='3'>\n" "<?xml version='1.0' encoding='UTF-8'?>\n"
+ "<cockatrice_carddatabase version='3'>\n"
+ " <!--\n" + " <!--\n"
+ " Created At: " + " Created At: "
+ datetime.datetime.utcnow().strftime("%a, %b %d %Y, %H:%M:%S") + datetime.datetime.utcnow().strftime("%a, %b %d %Y, %H:%M:%S")