Merge branch '0.2' of https://github.com/plexx-dev/Nassi-Shneiderman-Diagramm-Generator into 0.2
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
"""Iinstruction.py: #TODO"""
|
||||||
|
|
||||||
|
__author__ = "Weckyy702"
|
||||||
|
|
||||||
|
|
||||||
from typing import Iterable, List
|
from typing import Iterable, List
|
||||||
from abc import ABCMeta, abstractmethod
|
from abc import ABCMeta, abstractmethod
|
||||||
from draw import code_to_image as cti
|
from draw import code_to_image as cti
|
||||||
|
|||||||
@@ -1,3 +1,9 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
"""code_to_image.py: #TODO"""
|
||||||
|
|
||||||
|
__author__ = "plexx, Weckyy702"
|
||||||
|
|
||||||
from typing import Iterable
|
from typing import Iterable
|
||||||
from PIL import Image, ImageDraw, ImageFont
|
from PIL import Image, ImageDraw, ImageFont
|
||||||
import os
|
import os
|
||||||
|
|||||||
@@ -1,3 +1,10 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
"""code_to_image_wrapper.py: #TODO"""
|
||||||
|
|
||||||
|
__author__ = "Weckyy702"
|
||||||
|
|
||||||
|
|
||||||
import draw.code_to_image as cti
|
import draw.code_to_image as cti
|
||||||
|
|
||||||
class NSD_writer(object):
|
class NSD_writer(object):
|
||||||
|
|||||||
13
gui/gui.py
13
gui/gui.py
@@ -1,3 +1,10 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
"""gui.py: handle and init Gui."""
|
||||||
|
|
||||||
|
__author__ = "oleting"
|
||||||
|
|
||||||
|
|
||||||
from gui.utils import nassi, output
|
from gui.utils import nassi, output
|
||||||
from gui.new_window_layouts import Layout_std, Layout_settings
|
from gui.new_window_layouts import Layout_std, Layout_settings
|
||||||
from errors.custom import JavaSyntaxError, ScopeNotFoundException, InterpreterException, NoPathError
|
from errors.custom import JavaSyntaxError, ScopeNotFoundException, InterpreterException, NoPathError
|
||||||
@@ -155,12 +162,6 @@ class Gui:
|
|||||||
sg.popup(
|
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')
|
'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
|
# needed Input
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,10 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
"""new_window_layouts.py: create layouts"""
|
||||||
|
|
||||||
|
__author__ = "oleting"
|
||||||
|
|
||||||
|
|
||||||
import PySimpleGUI as sg
|
import PySimpleGUI as sg
|
||||||
|
|
||||||
class Layout_std:
|
class Layout_std:
|
||||||
@@ -8,8 +15,6 @@ class Layout_std:
|
|||||||
sg.Button(button_text='Create Image', key='-CREATE-'),
|
sg.Button(button_text='Create Image', key='-CREATE-'),
|
||||||
sg.Button(button_text='Credits', key='-CREDITS-'),
|
sg.Button(button_text='Credits', key='-CREDITS-'),
|
||||||
sg.Button(button_text='Settings', key='-SETTINGS-'),
|
sg.Button(button_text='Settings', key='-SETTINGS-'),
|
||||||
# * fun feature
|
|
||||||
sg.Button(button_text='Donate', key='-DONATE-'),
|
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,10 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
"""utils.py: utils for gui.py"""
|
||||||
|
|
||||||
|
__author__ = "oleting, Weckyy702"
|
||||||
|
|
||||||
|
|
||||||
from errors.custom import NoPathError
|
from errors.custom import NoPathError
|
||||||
from interpreter.NassiShneidermann import NassiShneidermanDiagram, Overwrite_behaviour, OB
|
from interpreter.NassiShneidermann import NassiShneidermanDiagram, Overwrite_behaviour, OB
|
||||||
|
|
||||||
@@ -27,8 +34,6 @@ def nassi(input_path: str, output_path: str, outputname: str, types, remove_tags
|
|||||||
|
|
||||||
cancel = NSD.convert_to_image(output_directory, on_conflict=behaviour)
|
cancel = NSD.convert_to_image(output_directory, on_conflict=behaviour)
|
||||||
|
|
||||||
if not cancel:
|
|
||||||
return None
|
|
||||||
|
|
||||||
return output_directory, is_empty
|
return output_directory, is_empty
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,11 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
"""NassiShneidermann.py: #TODO"""
|
||||||
|
|
||||||
|
__author__ = "Weckyy702"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
from typing import Dict, List, Optional
|
from typing import Dict, List, Optional
|
||||||
from PySimpleGUI import one_line_progress_meter
|
from PySimpleGUI import one_line_progress_meter
|
||||||
import logging
|
import logging
|
||||||
|
|||||||
@@ -1,3 +1,9 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
"""function_scope.py: #TODO"""
|
||||||
|
|
||||||
|
__author__ = "Weckyy702"
|
||||||
|
|
||||||
from typing import Iterable, List
|
from typing import Iterable, List
|
||||||
from draw.Iinstruction import Iinstruction
|
from draw.Iinstruction import Iinstruction
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,11 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
"""interpret_source.py: #TODO"""
|
||||||
|
|
||||||
|
__author__ = "Weckyy702"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import re
|
import re
|
||||||
from typing import Dict, List, Match, Tuple, Union, Iterable
|
from typing import Dict, List, Match, Tuple, Union, Iterable
|
||||||
|
|||||||
Reference in New Issue
Block a user