+ add progress bar
This commit is contained in:
@@ -138,5 +138,3 @@ class Layout_settings():
|
|||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
from os import stat
|
from os import stat
|
||||||
from interpreter.interpret_source import Function_scope
|
from interpreter.interpret_source import Function_scope
|
||||||
from typing import Dict, List, Optional
|
from typing import Dict, List, Optional
|
||||||
|
from PySimpleGUI import one_line_progress_meter
|
||||||
import logging
|
import logging
|
||||||
from enum import IntEnum
|
from enum import IntEnum
|
||||||
import os.path
|
import os.path
|
||||||
@@ -59,7 +60,11 @@ class NassiShneidermanDiagram:
|
|||||||
return filepath
|
return filepath
|
||||||
|
|
||||||
def convert_to_image(self, output_path: str, on_conflict: Overwrite_behaviour=OB.SKIP):
|
def convert_to_image(self, output_path: str, on_conflict: Overwrite_behaviour=OB.SKIP):
|
||||||
|
number_of_item = 1
|
||||||
for scope in self.function_scopes:
|
for scope in self.function_scopes:
|
||||||
|
number_of_item += 1
|
||||||
|
one_line_progress_meter('Progress', number_of_item, len(self.function_scopes), '-PROGRESSBAR-')
|
||||||
|
|
||||||
filepath = f"{output_path}/{scope.name}"
|
filepath = f"{output_path}/{scope.name}"
|
||||||
filepath = self.check_conflicts(filepath, on_conflict)
|
filepath = self.check_conflicts(filepath, on_conflict)
|
||||||
if filepath is not None:
|
if filepath is not None:
|
||||||
|
|||||||
Reference in New Issue
Block a user