From f1cf2d9f40287be3dbd4b550121ab1a1710a3d34 Mon Sep 17 00:00:00 2001 From: weckyy702 Date: Tue, 22 Dec 2020 22:00:55 +0100 Subject: [PATCH] fixed mistake in code_to_image.py @plexx-dev --- code_to_image.py | 3 +-- to_nassi.py | 5 ++++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/code_to_image.py b/code_to_image.py index 6a36690..0c36ba5 100644 --- a/code_to_image.py +++ b/code_to_image.py @@ -2,7 +2,6 @@ import sys from typing import Iterable from PIL import Image, ImageDraw, ImageFont -output_dir = "res/output/" datei_endung = ".png" img = None @@ -103,7 +102,7 @@ def draw_while_loop_back(condition: str, x: int, y: int, xsize: int, ysize: int) def NSD_save(filename: str): """Save the created file""" - img.save(output_dir + filename + datei_endung , "PNG") + img.save(filename + datei_endung ,".png") #x_offset , y_offset, x_size, y_size = draw_while_loop("lol", 0, 0, 100, 200) if __name__ == "__main__": diff --git a/to_nassi.py b/to_nassi.py index 5df33bb..f0fe675 100644 --- a/to_nassi.py +++ b/to_nassi.py @@ -5,4 +5,7 @@ from Iinstruction import * def nassi(filepath:str, output_path: str): NSD = NassiShneidermanDiagram(False) NSD.load_from_file(filepath) - NSD.convert_to_image(output_path + "Nassi-Shneider-Diagramm", 500) \ No newline at end of file + NSD.convert_to_image(output_path + "Nassi-Shneider-Diagramm", 500) + +if __name__ == "__main__": + nassi("input.java", "res/ouput/") \ No newline at end of file