diff --git a/NassiShneidermann.py b/NassiShneidermann.py index 82f29a8..dee0c09 100644 --- a/NassiShneidermann.py +++ b/NassiShneidermann.py @@ -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)""" diff --git a/README.md b/README.md index 2a6b19f..ee43f6a 100644 --- a/README.md +++ b/README.md @@ -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. \ No newline at end of file diff --git a/__pycache__/to_nassi.cpython-38.pyc b/__pycache__/to_nassi.cpython-38.pyc new file mode 100644 index 0000000..600e92a Binary files /dev/null and b/__pycache__/to_nassi.cpython-38.pyc differ diff --git a/gui.py b/gui.py index 76c93dd..1ffa3ae 100644 --- a/gui.py +++ b/gui.py @@ -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 diff --git a/to_nassi.py b/to_nassi.py new file mode 100644 index 0000000..ecdb3f6 --- /dev/null +++ b/to_nassi.py @@ -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) \ No newline at end of file