This commit is contained in:
weckyy702
2021-02-09 15:47:34 +01:00
10 changed files with 69 additions and 11 deletions

View File

@@ -1,3 +1,10 @@
#!/usr/bin/env python
"""Iinstruction.py: #TODO"""
__author__ = "Weckyy702"
from typing import Iterable, List
from abc import ABCMeta, abstractmethod
from draw import code_to_image as cti

View File

@@ -1,3 +1,9 @@
#!/usr/bin/env python
"""code_to_image.py: #TODO"""
__author__ = "plexx, Weckyy702"
from typing import Iterable
from PIL import Image, ImageDraw, ImageFont
import os

View File

@@ -1,3 +1,10 @@
#!/usr/bin/env python
"""code_to_image_wrapper.py: #TODO"""
__author__ = "Weckyy702"
import draw.code_to_image as cti
class NSD_writer(object):

View File

@@ -1,3 +1,10 @@
#!/usr/bin/env python
"""gui.py: handle and init Gui."""
__author__ = "oleting"
from gui.utils import nassi, output
from gui.new_window_layouts import Layout_std, Layout_settings
from errors.custom import JavaSyntaxError, ScopeNotFoundException, InterpreterException, NoPathError
@@ -155,12 +162,6 @@ class Gui:
sg.popup(
'This was made by plexx(Image generation), Weckyy702(Interpreter) and oleting(Frontend). Used Python 3.9.1, Libraries PySimpleGUI and Pillow.', title='Credits')
# handle fun feature
if event == '-DONATE-':
logging.debug(('event = ' + str(event)))
sg.popup_notify(
('You donated $' + str(random.randint(500, 100000000)) + '.'), title='Thanks')
# needed Input

View File

@@ -1,3 +1,10 @@
#!/usr/bin/env python
"""new_window_layouts.py: create layouts"""
__author__ = "oleting"
import PySimpleGUI as sg
class Layout_std:
@@ -8,8 +15,6 @@ class Layout_std:
sg.Button(button_text='Create Image', key='-CREATE-'),
sg.Button(button_text='Credits', key='-CREDITS-'),
sg.Button(button_text='Settings', key='-SETTINGS-'),
# * fun feature
sg.Button(button_text='Donate', key='-DONATE-'),
]
]

View File

@@ -1,3 +1,10 @@
#!/usr/bin/env python
"""utils.py: utils for gui.py"""
__author__ = "oleting, Weckyy702"
from errors.custom import NoPathError
from interpreter.NassiShneidermann import NassiShneidermanDiagram, Overwrite_behaviour, OB
@@ -27,9 +34,7 @@ def nassi(input_path: str, output_path: str, outputname: str, types, remove_tags
cancel = NSD.convert_to_image(output_directory, on_conflict=behaviour)
if not cancel:
return None
return output_directory, is_empty

View File

@@ -1,3 +1,11 @@
#!/usr/bin/env python
"""NassiShneidermann.py: #TODO"""
__author__ = "Weckyy702"
from typing import Dict, List, Optional
from PySimpleGUI import one_line_progress_meter
import logging

View File

@@ -1,3 +1,9 @@
#!/usr/bin/env python
"""function_scope.py: #TODO"""
__author__ = "Weckyy702"
from typing import Iterable, List
from draw.Iinstruction import Iinstruction

View File

@@ -1,3 +1,11 @@
#!/usr/bin/env python
"""interpret_source.py: #TODO"""
__author__ = "Weckyy702"
import logging
import re
from typing import Dict, List, Match, Tuple, Union, Iterable

5
run.py
View File

@@ -1,4 +1,9 @@
#!/usr/bin/env python
"""run.py: entrypoint"""
__author__ = "oleting, Weckyy702"
from gui.gui import Gui as gui
from sys import argv