gui, readme

This commit is contained in:
oleting
2020-12-21 10:46:03 +01:00
parent 7f5eae193e
commit be0f45cab9
5 changed files with 18 additions and 11 deletions

View File

@@ -50,18 +50,16 @@ class NassiShneidermanDiagram:
for line in filtered_lines:
if line.startswith("while("):
def nassi(NSD):
NSD.load_from_file("res/input/input.java")
NSD.convert_to_image("Nina", 500)
if __name__ == "__main__":
"""for debugging"""
"""if __name__ == "__main__":
#for debugging
from Iinstruction import *
NSD = NassiShneidermanDiagram(True)
NSD.load_from_file("res/input/input.java")
NSD.convert_to_image("Nina", 500)
NSD.convert_to_image("Nina", 500)"""

View File

@@ -1,2 +1,6 @@
# Nassi-Shneiderman-Diagramm-Generator
This python code generates a Nassi Shneiderman Diagramm from Java Source Code
How it works:
In the final Version, you will just have to execute the nassi.exe and choose your Code, it will display the Nassi-Shneiderman-Diagramm and give you the path of the created picture.

Binary file not shown.

7
gui.py
View File

@@ -1,5 +1,5 @@
from NassiShneidermann import NassiShneidermanDiagram, nassi
from to_nassi import nassi
import PySimpleGUI as sg
import os.path
@@ -99,10 +99,7 @@ while True:
)
window["-TOUT-"].update(filename)
from Iinstruction import *
NSD = NassiShneidermanDiagram(True)
nassi(NSD)
nassi(filename)
except:
pass

8
to_nassi.py Normal file
View File

@@ -0,0 +1,8 @@
from NassiShneidermann import NassiShneidermanDiagram, nassi
from Iinstruction import *
def nassi(filepath):
NSD = NassiShneidermanDiagram(True)
NSD.load_from_file(filepath)
NSD.convert_to_image("Nina", 500)