Anthology Scripts
This commit is contained in:
9849
CustomerNotes/Anthology/Workflows_js_nodes.json
Normal file
9849
CustomerNotes/Anthology/Workflows_js_nodes.json
Normal file
File diff suppressed because it is too large
Load Diff
26
CustomerNotes/Anthology/extract_domain_mapping.py
Normal file
26
CustomerNotes/Anthology/extract_domain_mapping.py
Normal file
@ -0,0 +1,26 @@
|
||||
import csv
|
||||
import re
|
||||
|
||||
listtuple = []
|
||||
linelist = []
|
||||
count = 0
|
||||
with open('./Workflows_js_nodes.js', 'r') as file:
|
||||
for num, line in enumerate(file, 1):
|
||||
if "<<<" in line:
|
||||
linelist.append(num)
|
||||
if ">>>" in line:
|
||||
linelist.append(num)
|
||||
linelist = sorted(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)
|
||||
except IndexError as e:
|
||||
print(e)
|
||||
|
||||
print(listtuple)
|
||||
Reference in New Issue
Block a user