From be0f45cab96ac95cb2d8dd62d5ae276b0b6b5927 Mon Sep 17 00:00:00 2001 From: oleting Date: Mon, 21 Dec 2020 10:46:03 +0100 Subject: [PATCH] gui, readme --- NassiShneidermann.py | 10 ++++------ README.md | 4 ++++ __pycache__/to_nassi.cpython-38.pyc | Bin 0 -> 459 bytes gui.py | 7 ++----- to_nassi.py | 8 ++++++++ 5 files changed, 18 insertions(+), 11 deletions(-) create mode 100644 __pycache__/to_nassi.cpython-38.pyc create mode 100644 to_nassi.py 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 0000000000000000000000000000000000000000..600e92ad6818e74609435588905cae9cd8015514 GIT binary patch literal 459 zcmYjNF-rq66wb?C>rt%K$z5DdsH2032o{RVEv-v9IKm}u1DB-at_7h^`a|sKU%E-q z#ofutm(bxJd@p%+L?EIVBn_S3k9wZiZc~GB+UB;bd#)ob6cq)x_ys<7v z_Rx2=es&SE^$@kEC6K@X!dsTc>@=`-$V`wO^6dCgnYwYCvQgFqQ5|=LTy1izt=LrZ N&VOF*e{2Lv^bh$_Z({%e literal 0 HcmV?d00001 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