From cd4a5a7f20a84563c979e6d62ec217310dfbfdc0 Mon Sep 17 00:00:00 2001 From: Alliyya Mo Date: Wed, 4 May 2022 09:57:07 -0400 Subject: [PATCH] adding documentation --- Biography/culturalForm.py | 2 ++ Mods/modsBib.py | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Biography/culturalForm.py b/Biography/culturalForm.py index 1c12b71..9eaa89c 100644 --- a/Biography/culturalForm.py +++ b/Biography/culturalForm.py @@ -19,6 +19,8 @@ Forebear still needs to be handled/attempted with a query --> load up gurjap's produced graph and query it for forebear info to test temp solution until endpoint is active +TODO: review labels Gender Label Connection (woman) + """ diff --git a/Mods/modsBib.py b/Mods/modsBib.py index c2a83c5..c5dd149 100644 --- a/Mods/modsBib.py +++ b/Mods/modsBib.py @@ -321,7 +321,7 @@ class BibliographyParse: id = "" relatedItem = False - # Maps MODS types to BIBFAME types + # Maps MODS types to BIBFRAME types type_map = { "text": BF.Text, "audio": BF.Audio, @@ -1182,17 +1182,17 @@ def add_types_to_graph(graph,uri,label): except UnicodeError: pass - # test_filenames = ["d75215cb-d102-4256-9538-c44bfbf490d9.xml","2e3e602e-b82c-441d-81bc-883f834b20c1.xml","13f8e71a-def5-41e4-90a0-6ae1092ae446.xml","16d427db-a8a2-4f33-ac53-9f811672584b.xml","4109f3c5-0508-447b-9f86-ea8052ff3981.xml", - # "e1b2f98f-1001-4787-a711-464f1527e5a7.xml", "15655c66-8c0b-4493-8f68-8d6cf4998303.xml","0d0e00bf-3224-4286-8ec4-f389ec6cc7bb.xml"] # VW, the wave + test_filenames = ["d75215cb-d102-4256-9538-c44bfbf490d9.xml","2e3e602e-b82c-441d-81bc-883f834b20c1.xml","13f8e71a-def5-41e4-90a0-6ae1092ae446.xml","16d427db-a8a2-4f33-ac53-9f811672584b.xml","4109f3c5-0508-447b-9f86-ea8052ff3981.xml", + "e1b2f98f-1001-4787-a711-464f1527e5a7.xml", "15655c66-8c0b-4493-8f68-8d6cf4998303.xml","0d0e00bf-3224-4286-8ec4-f389ec6cc7bb.xml"] # VW, the wave # test_filenames = ["e57c7868-a3b7-460e-9f20-399fab7f894c.xml"] # test_filenames = ["64d3c008-8a9d-415b-b52b-91d232c00952.xml", # test_filenames = ["55aff3fb-8ea9-4e95-9e04-0f3e630896e3.xml", "0c133817-f55e-4a8f-a9b4-474566418d9b.xml"] - # for fname in test_filenames: count = 1 total = len(os.listdir(dirname)) - for fname in os.listdir(dirname): + # for fname in os.listdir(dirname): + for fname in test_filenames: print(F"{count}/{total} files extracted") path = os.path.join(dirname, fname) if os.path.isdir(path):