Skip to content

Commit

Permalink
revert main
Browse files Browse the repository at this point in the history
  • Loading branch information
kokes committed Jul 19, 2022
1 parent 6992eea commit 0cd4d6e
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions data/justice/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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):
Expand All @@ -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),
Expand Down Expand Up @@ -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__":
Expand Down

0 comments on commit 0cd4d6e

Please sign in to comment.