diff --git a/CustomerNotes/Anthology/extract_domain_mapping.py b/CustomerNotes/Anthology/extract_domain_mapping.py index c8b75b81..faa82e2c 100644 --- a/CustomerNotes/Anthology/extract_domain_mapping.py +++ b/CustomerNotes/Anthology/extract_domain_mapping.py @@ -1,26 +1,47 @@ import csv +import pandas as pd import re -listtuple = [] -linelist = [] -count = 0 +LISTTUPLE = [] +LINELIST = [] +COUNT = 0 +DOMAIN_DICT = {} +df = pd.DataFrame() + with open('./Workflows_js_nodes.js', 'r') as file: for num, line in enumerate(file, 1): if "<<<" in line: - linelist.append(num) + LINELIST.append(num) if ">>>" in line: - linelist.append(num) -linelist = sorted(linelist) -x = len(linelist) + LINELIST.append(num) +LINELIST = sorted(LINELIST) +# print(LINELIST) +x = len(LINELIST) try: - while count in range(x): - count += 1 - temp_tupe = (linelist[0], linelist[1]) - listtuple.append(temp_tupe) - linelist.pop(0) - linelist.pop(1) + while COUNT in range(x): + COUNT += 1 + temp_tupe = (LINELIST[0], LINELIST[1]) + LISTTUPLE.append(temp_tupe) + LINELIST = LINELIST[2:] + # LINELIST.pop(1) except IndexError as e: - print(e) + pass -print(listtuple) +for pagetuple in LISTTUPLE: + res_list = [] + domain_line = int(pagetuple[0]-2) + seg_start = int(pagetuple[0]-1) + seg_end = int(pagetuple[1]-1) + with open('./Workflows_js_nodes.js', 'r') as file: + lines = file.readlines() + title = lines[domain_line][4:-1] + segment = lines[seg_start:seg_end] + for line in segment: + result = re.search(r"(?:'@[a-z|.]+.[a-z]{3})", line) + if result: + res = result.group()[1:] + res_list.append(res) + DOMAIN_DICT[title] = res_list +df = df.from_dict(DOMAIN_DICT, orient='index') +df.to_csv('~/Downloads/test-anthodomains.csv') diff --git a/CustomerNotes/SwiftMedical/SwiftMedical.md b/CustomerNotes/SwiftMedical/SwiftMedical.md index b3a015de..7adf389e 100644 --- a/CustomerNotes/SwiftMedical/SwiftMedical.md +++ b/CustomerNotes/SwiftMedical/SwiftMedical.md @@ -191,3 +191,8 @@ TODO: Enable search query dashboard on Swift Medical * Open doc directly from another page without authentication * Kayla is used to this with all higher ed LMSes and would like for this to be Northpass Functionality. + + +## 11/1/2023 + +### Learning Page & App Delayed diff --git a/Scripts/API_Tests/add-pgaids.py b/Scripts/API_Tests/add-pgaids.py index bdc468d2..418a4e27 100644 --- a/Scripts/API_Tests/add-pgaids.py +++ b/Scripts/API_Tests/add-pgaids.py @@ -4,7 +4,7 @@ from pathlib import Path import Apikeys import os -basefile = "/Users/normrasmussen/Downloads/Mizuno-September23-Completions.csv" +basefile = "/Users/normrasmussen/Downloads/Mizuno_Completions.csv" api_key = Apikeys.mizuno uuid_url = "https://api.northpass.com/v2/people?filter[email][eq]=" prop_url = "https://api.northpass.com/v2/properties/people/" @@ -51,7 +51,7 @@ def load_file(basefile): # completions = completions.iloc[:, 0:] print(completions) completions.to_csv( - "/Users/normrasmussen/Downloads/Mizuno-09.23-Completions_with_PGAIDs.csv", + "/Users/normrasmussen/Downloads/Mizuno-10.23-Completions_with_PGAIDs.csv", index=False, )