From 0cd4d6e32cd418745ebab02d2ebd3f64fc219195 Mon Sep 17 00:00:00 2001 From: Ondrej Kokes Date: Tue, 19 Jul 2022 17:56:00 +0200 Subject: [PATCH] revert main --- data/justice/main.py | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/data/justice/main.py b/data/justice/main.py index 063c8f4..7b9f2fa 100644 --- a/data/justice/main.py +++ b/data/justice/main.py @@ -108,7 +108,7 @@ def main(outdir: str, partial: bool = False): urls.append(ds_url[0]) - neumim = set() #  TODO + neumim = set() # TODO schemasd = dict() schema_autogen = dict() # TODO @@ -182,13 +182,7 @@ def main(outdir: str, partial: bool = False): udaj_typ = udaj_raw.find("udajTyp/kod").text if udaj_typ not in schemasd: - if udaj_typ not in neumim: - print("nepodporovany udaj", udaj_typ, url) neumim.add(udaj_typ) - schema_autogen[udaj_typ] = merge( - gen_schema(udaj_raw), - schema_autogen.get(udaj_typ, {}), - ) continue if not schemasd[udaj_typ].get("ignore", False): @@ -212,8 +206,6 @@ def main(outdir: str, partial: bool = False): podudaj_typ = podudaj_raw.find("udajTyp/kod").text if podudaj_typ not in schemasd: - if podudaj_typ not in neumim: - print("nepodporovany podudaj", podudaj_typ, url) neumim.add(podudaj_typ) schema_autogen[podudaj_typ] = merge( gen_schema(podudaj_raw), @@ -250,10 +242,8 @@ def main(outdir: str, partial: bool = False): el.close() # TODO: resolve - if schema_autogen: - print(f"nalezeno {len(schema_autogen)} novych (sub)typu ve zdrojovych datech") - with open("xml_schema_chybejici.json", "w") as fw: - json.dump(schema_autogen, fw, indent=2, ensure_ascii=False) + # with open('xml_schema_chybejici.json', 'w') as fw: + # json.dump(schema_autogen, fw, indent=2, ensure_ascii=False) if __name__ == "__main__":