Commit 8d86d30f authored by basakz's avatar basakz
Browse files

multiple stages of folders/sub folders were added. It has a bug that some links are not correct.

parent ea96b18a
......@@ -27,31 +27,34 @@ for f in developerDict["files"]:
#print(line['line_number'])
if filecounter !=0:
#fileDict[file['file']] = filecounter
y=f['file'].split('/',1)
# print(y[0])
# print(y[1])
if y[0] not in Filelabel:
Filelabel.append(y[0])
i += 1
Filetarget.append(i)
Filevalue.append(filecounter)
Filesource.append(0)
sourceValue= i
# print(Filelabel)
y=f['file'].split('/')
number_of_elements = len(y)
#print(number_of_elements)
j=0
sourceValue=0 #sourceValue value keeps the stages
while j < number_of_elements:
#print(y[j])
if y[j] not in Filelabel:
Filelabel.append(y[j])
Filesource.append(j)
i += 1
Filetarget.append(i)
Filevalue.append(filecounter)
sourceValue= i
k=j+1
if k < number_of_elements:
Filelabel.append(y[k])
i += 1
Filetarget.append(i)
Filevalue.append(filecounter)
Filesource.append(sourceValue)
j += 1
#print(Filelabel)
# print(Filesource)
# print(Filetarget)
# print(Filevalue)
#else:
#print(Filelabel)
Filelabel.append(y[1])
i += 1
Filetarget.append(i)
Filevalue.append(filecounter)
Filesource.append(sourceValue)
#print("Test files: ", file['file'])
#print("File counter: ", filecounter)
#print("Test lines: ", developerDict["files"]["lines"])
#print(fileDict)
print("Done reading nested JSON Array")
fig = go.Figure(data=[go.Sankey(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment