This commit is contained in:
2019-09-19 01:00:54 +02:00
parent 0c2346bf59
commit c16742291c
3 changed files with 25 additions and 11 deletions

View File

@@ -74,10 +74,10 @@ def pull_all():
f.write(yaml_data + "\n")
print(f"./cards/{card_id}.yaml written!")
continue
with open(f"cards/{card_id}.xml", "w") as f:
ftype = "xml" if data.strip() else "yaml"
with open(f"cards/{card_id}.{ftype}", "w") as f:
f.write(data + "\n")
print(f"./cards/{card_id}.xml written!")
print(f"./cards/{card_id}.{ftype} written!")
def push_all():
existing_card_ids = get_card_ids()