+ use utils

This commit is contained in:
oleting
2020-12-24 00:23:52 +01:00
parent 5c6cf88991
commit c26ca63a40
2 changed files with 20 additions and 23 deletions

View File

@@ -1,3 +1,5 @@
import os
from interpreter.NassiShneidermann import NassiShneidermanDiagram
from draw.Iinstruction import *
@@ -7,6 +9,20 @@ def nassi(filepath:str, output_path: str):
NSD.load_from_file(filepath)
NSD.convert_to_image(output_path + "/Nassi-Shneider-Diagramm", 500)
def output(values):
output_path = values['-OUTPUT FOLDER-']
try:
file_list = os.listdir(output_path)
except:
file_list = []
fnames = [
f
for f in file_list
if os.path.isfile(os.path.join(output_path, f))
and f.lower().endswith(('.png', '.gif'))
]
return fnames
if __name__ == "__main__":
"""Debugging"""
nassi("res/input/input.java", "res/output")