Skip to content

Commit dec18df

Browse files
authored
Merge pull request #59 from Integration-Automation/dev
Dev
2 parents b8ba6d6 + 7b74b44 commit dec18df

File tree

25 files changed

+1005
-142
lines changed

25 files changed

+1005
-142
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,20 @@
3333
> * Automation instance monitor.
3434
> * Automation project support.
3535
> * Docs support.
36+
> * BingGPT (requires setting up cookies, tutorial available in the IDE)
37+
> * DALL-E3 Bing version for image generation (requires setting up another type of cookie, tutorial available in the IDE)
38+
> * Auto-save (available after the first save or after opening a file), auto-complete, jump to definition.
39+
> * Bilingual interface (English, Traditional Chinese) Choose font and size.
40+
> * Tabbed browsing, split window functionality.
41+
> * Embedded browser.
42+
> * Embedded Jupyter and IPython.
43+
> * Built-in automation packages.
44+
> * Multiple UI style choices.
45+
> * Python venv and management to choose the Python interpreter to use.
46+
> * Code style checking and auto-formatting (PEP8).
47+
> * Debugger.
48+
> * Multiple Shell command executors (run multiple Shells at once).
49+
> * Multiple program executors (run multiple programs at once). Custom colors.
3650
3751

3852
---

automation_editor/automation_editor_ui/complete/complete_extend.py

Lines changed: 0 additions & 28 deletions
This file was deleted.

automation_editor/automation_editor_ui/editor_main/main_ui.py

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import sys
22
from typing import List, Dict, Type
33

4-
from PySide6.QtCore import QTimer
4+
from PySide6.QtCore import QTimer, QCoreApplication
55
from PySide6.QtWidgets import QApplication, QWidget
6-
from je_editor import EditorMain
6+
from je_editor import EditorMain, language_wrapper
77
from qt_material import apply_stylesheet
88

9-
from automation_editor.automation_editor_ui.complete.complete_extend import complete_extend_package
9+
from automation_editor.automation_editor_ui.extend_multi_language.update_language_dict import update_language_dict
1010
from automation_editor.automation_editor_ui.menu.build_menubar import add_menu_to_menubar
1111
from automation_editor.automation_editor_ui.syntax.syntax_extend import \
1212
syntax_extend_package
@@ -16,25 +16,27 @@
1616

1717
class AutomationEditor(EditorMain):
1818

19-
def __init__(self, debug_mode: bool = False):
20-
super().__init__()
19+
def __init__(self, debug_mode: bool = False, show_system_tray_ray: bool = False):
20+
super().__init__(show_system_tray_ray=show_system_tray_ray)
2121
self.current_run_code_window: List[QWidget] = list()
2222
# Project compiler if user not choose this will use which to find
2323
self.python_compiler = None
2424
# Delete JEditor help
2525
self.help_menu.deleteLater()
26+
# System tray change
27+
if self.show_system_tray_ray:
28+
self.system_tray.main_window = self
29+
self.system_tray.setToolTip(language_wrapper.language_word_dict.get("automation_editor_application_name"))
30+
# Update language_dict
31+
update_language_dict()
2632
# Menu
2733
add_menu_to_menubar(self)
2834
syntax_extend_package(self)
29-
complete_extend_package(self)
30-
# System tray change
31-
self.system_tray.main_window = self
32-
self.system_tray.setToolTip("Automation Editor")
3335
# Tab
3436
for widget_name, widget in EDITOR_EXTEND_TAB.items():
3537
self.tab_widget.addTab(widget(), widget_name)
3638
# Title
37-
self.setWindowTitle("Automation Editor")
39+
self.setWindowTitle(language_wrapper.language_word_dict.get("automation_editor_application_name"))
3840
if debug_mode:
3941
close_timer = QTimer(self)
4042
close_timer.setInterval(10000)
@@ -60,7 +62,9 @@ def start_editor(debug_mode: bool = False, **kwargs) -> None:
6062
Start editor instance
6163
:return: None
6264
"""
63-
new_editor = QApplication(sys.argv)
65+
new_editor = QCoreApplication.instance()
66+
if new_editor is None:
67+
new_editor = QApplication(sys.argv)
6468
window = AutomationEditor(debug_mode, **kwargs)
6569
apply_stylesheet(new_editor, theme="dark_amber.xml")
6670
window.showMaximized()
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
from je_editor import english_word_dict
2+
3+
4+
def update_english_word_dict():
5+
english_word_dict.update(
6+
{
7+
# application name
8+
"automation_editor_application_name": "Automation Editor",
9+
# Menubar
10+
"automation_menu_label": "Automation",
11+
"install_menu_label": "Install",
12+
# Normal label
13+
"run_label": "Run",
14+
"help_label": "HELP",
15+
"project_label": "Project",
16+
# APITestka Menu
17+
"apitestka_menu_label": "APITestka",
18+
"apitestka_run_script_label": "Run APITestka Script",
19+
"apitestka_run_script_with_send_label": "Run APITestka With Send",
20+
"apitestka_run_multi_script_label": "Run Multi APITestka Script",
21+
"apitestka_run_multi_script_with_send_label": "Run Multi APITestka Script With Send",
22+
"apitestka_doc_label": "Open APITestka Doc",
23+
"apitestka_doc_tab_label": "APITestka Doc",
24+
"apitestka_github_label": "Open APITestka GitHub",
25+
"apitestka_github_tab_label": "APITestka GitHub",
26+
"apitestka_create_project_label": "Create APITestka Project",
27+
# Autocontrol Menu
28+
"autocontrol_menu_label": "Autocontrol",
29+
"autocontrol_run_script_label": "Run Autocontrol Script",
30+
"autocontrol_run_script_with_send_label": "Run Autocontrol With Send",
31+
"autocontrol_run_multi_script_label": "Run Multi Autocontrol Script",
32+
"autocontrol_run_multi_script_with_send_label": "Run Multi Autocontrol Script With Send",
33+
"autocontrol_doc_label": "Open Autocontrol Doc",
34+
"autocontrol_doc_tab_label": "Autocontrol Doc",
35+
"autocontrol_github_label": "Open Autocontrol GitHub",
36+
"autocontrol_github_tab_label": "Autocontrol GitHub",
37+
"autocontrol_create_project_label": "Create Autocontrol Project",
38+
"autocontrol_record_menu_label": "Record",
39+
"autocontrol_record_start_label": "Record Start",
40+
"autocontrol_record_stop_label": "Record Stop",
41+
# File Automation Menu
42+
"file_automation_menu_label": "FileAutomation",
43+
"file_automation_run_script_label": "Run FileAutomation Script",
44+
"file_automation_run_script_with_send_label": "Run FileAutomation With Send",
45+
"file_automation_run_multi_script_label": "Run Multi FileAutomation Script",
46+
"file_automation_run_multi_script_with_send_label": "Run Multi FileAutomation Script With Send",
47+
"file_automation_doc_label": "Open FileAutomation Doc",
48+
"file_automation_doc_tab_label": "FileAutomation Doc",
49+
"file_automation_github_label": "Open FileAutomation GitHub",
50+
"file_automation_github_tab_label": "FileAutomation GitHub",
51+
"file_automation_create_project_label": "Create FileAutomation Project",
52+
# Load Density Menu
53+
"load_density_menu_label": "LoadDensity",
54+
"load_density_run_script_label": "Run LoadDensity Script",
55+
"load_density_run_script_with_send_label": "Run LoadDensity With Send",
56+
"load_density_run_multi_script_label": "Run Multi LoadDensity Script",
57+
"load_density_run_multi_script_with_send_label": "Run Multi LoadDensity Script With Send",
58+
"load_density_doc_label": "Open LoadDensity Doc",
59+
"load_density_doc_tab_label": "LoadDensity Doc",
60+
"load_density_github_label": "Open LoadDensity GitHub",
61+
"load_density_github_tab_label": "LoadDensity GitHub",
62+
"load_density_create_project_label": "Create LoadDensity Project",
63+
# Mail Thunder Menu
64+
"mail_thunder_menu_label": "MailThunder",
65+
"mail_thunder_run_script_label": "Run MailThunder Script",
66+
"mail_thunder_doc_label": "Open MailThunder Doc",
67+
"mail_thunder_doc_tab_label": "MailThunder Doc",
68+
"mail_thunder_github_label": "Open MailThunder GitHub",
69+
"mail_thunder_github_tab_label": "MailThunder GitHub",
70+
"mail_thunder_create_project_label": "Create MailThunder Project",
71+
# Webrunner Menu
72+
"web_runner_menu_label": "WebRunner",
73+
"web_runner_run_script_label": "Run WebRunner Script",
74+
"web_runner_run_script_with_send_label": "Run WebRunner With Send",
75+
"web_runner_run_multi_script_label": "Run Multi WebRunner Script",
76+
"web_runner_run_multi_script_with_send_label": "Run Multi WebRunner Script With Send",
77+
"web_runner_doc_label": "Open WebRunner Doc",
78+
"web_runner_doc_tab_label": "WebRunner Doc",
79+
"web_runner_github_label": "Open WebRunner GitHub",
80+
"web_runner_github_tab_label": "WebRunner GitHub",
81+
"web_runner_create_project_label": "Create WebRunner Project",
82+
# Install Menu
83+
"install_menu_autocontrol": "Install AutoControl",
84+
"install_menu_apitestka": "Install APITestka",
85+
"install_menu_loaddensity": "Install LoadDensity",
86+
"install_menu_webrunner": "Install WebRunner",
87+
"install_menu_automation_file": "Install Automation File",
88+
"install_menu_mail_thunder": "Install MailThunder",
89+
"install_menu_tools_install_menu_label": "Tools",
90+
"install_menu_tools_install_build_tools": "Install Build Tools",
91+
# Tools Menu
92+
"tools_menu_re_edge_gpt_label": "ReEdgeGPT",
93+
"tools_menu_re_edge_gpt_doc_label": "Open ReEdgeGPT Doc",
94+
"tools_menu_re_edge_gpt_doc_tab_label": "ReEdgeGPT Doc",
95+
"tools_menu_re_edge_gpt_github_label": "Open ReEdgeGPT GitHub",
96+
"tools_menu_re_edge_gpt_github_tab_label": "ReEdgeGPT GitHub",
97+
}
98+
)
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
from je_editor import traditional_chinese_word_dict
2+
3+
4+
def update_traditional_chinese_word_dict():
5+
traditional_chinese_word_dict.update(
6+
{
7+
# application name
8+
"automation_editor_application_name": "Automation Editor",
9+
# Menubar
10+
"automation_menu_label": "自動化",
11+
"install_menu_label": "安裝",
12+
# Normal label
13+
"run_label": "運行",
14+
"help_label": "幫助",
15+
"project_label": "專案",
16+
# APITestka Menu
17+
"apitestka_menu_label": "APITestka",
18+
"apitestka_run_script_label": "運行 APITestka 腳本",
19+
"apitestka_run_script_with_send_label": "運行 APITestka 腳本並寄信",
20+
"apitestka_run_multi_script_label": "運行多個 APITestka 腳本",
21+
"apitestka_run_multi_script_with_send_label": "運行多個 APITestka 腳本並寄信",
22+
"apitestka_doc_label": "開啟 APITestka 文件",
23+
"apitestka_doc_tab_label": "APITestka 文件",
24+
"apitestka_github_label": "開啟 APITestka GitHub",
25+
"apitestka_github_tab_label": "APITestka GitHub",
26+
"apitestka_create_project_label": "建立 APITestka 專案",
27+
# Autocontrol Menu
28+
"autocontrol_menu_label": "Autocontrol",
29+
"autocontrol_run_script_label": "運行 Autocontrol 腳本",
30+
"autocontrol_run_script_with_send_label": "運行 Autocontrol 腳本並寄信",
31+
"autocontrol_run_multi_script_label": "運行 Multi Autocontrol 腳本",
32+
"autocontrol_run_multi_script_with_send_label": "運行 Multi Autocontrol 腳本 腳本並寄信",
33+
"autocontrol_doc_label": "開啟 Autocontrol 文件",
34+
"autocontrol_doc_tab_label": "Autocontrol 文件",
35+
"autocontrol_github_label": "開啟 Autocontrol GitHub",
36+
"autocontrol_github_tab_label": "Autocontrol GitHub",
37+
"autocontrol_create_project_label": "建立 Autocontrol 專案",
38+
"autocontrol_record_menu_label": "紀錄",
39+
"autocontrol_record_start_label": "紀錄 Start",
40+
"autocontrol_record_stop_label": "紀錄 Stop",
41+
# File Automation Menu
42+
"file_automation_menu_label": "FileAutomation",
43+
"file_automation_run_script_label": "運行 FileAutomation 腳本",
44+
"file_automation_run_script_with_send_label": "運行 FileAutomation 腳本並寄信",
45+
"file_automation_run_multi_script_label": "運行 Multi FileAutomation 腳本",
46+
"file_automation_run_multi_script_with_send_label": "運行 Multi FileAutomation 腳本 腳本並寄信",
47+
"file_automation_doc_label": "開啟 FileAutomation 文件",
48+
"file_automation_doc_tab_label": "FileAutomation 文件",
49+
"file_automation_github_label": "開啟 FileAutomation GitHub",
50+
"file_automation_github_tab_label": "FileAutomation GitHub",
51+
"file_automation_create_project_label": "建立 FileAutomation 專案",
52+
# Load Density Menu
53+
"load_density_menu_label": "LoadDensity",
54+
"load_density_run_script_label": "運行 LoadDensity 腳本",
55+
"load_density_run_script_with_send_label": "運行 LoadDensity 腳本並寄信",
56+
"load_density_run_multi_script_label": "運行 Multi LoadDensity 腳本",
57+
"load_density_run_multi_script_with_send_label": "運行 Multi LoadDensity 腳本 腳本並寄信",
58+
"load_density_doc_label": "開啟 LoadDensity 文件",
59+
"load_density_doc_tab_label": "LoadDensity 文件",
60+
"load_density_github_label": "開啟 LoadDensity GitHub",
61+
"load_density_github_tab_label": "LoadDensity GitHub",
62+
"load_density_create_project_label": "建立 LoadDensity 專案",
63+
# Mail Thunder Menu
64+
"mail_thunder_menu_label": "MailThunder",
65+
"mail_thunder_run_script_label": "運行 MailThunder 腳本",
66+
"mail_thunder_doc_label": "開啟 MailThunder 文件",
67+
"mail_thunder_doc_tab_label": "MailThunder 文件",
68+
"mail_thunder_github_label": "開啟 MailThunder GitHub",
69+
"mail_thunder_github_tab_label": "MailThunder GitHub",
70+
"mail_thunder_create_project_label": "建立 MailThunder 專案",
71+
# Webrunner Menu
72+
"web_runner_menu_label": "Web運行ner",
73+
"web_runner_run_script_label": "運行 WebRunner 腳本",
74+
"web_runner_run_script_with_send_label": "運行 WebRunner 腳本並寄信",
75+
"web_runner_run_multi_script_label": "運行 Multi WebRunner 腳本",
76+
"web_runner_run_multi_script_with_send_label": "運行 Multi WebRunner 腳本 腳本並寄信",
77+
"web_runner_doc_label": "開啟 WebRunner 文件",
78+
"web_runner_doc_tab_label": "WebRunner 文件",
79+
"web_runner_github_label": "開啟 WebRunner GitHub",
80+
"web_runner_github_tab_label": "WebRunner GitHub",
81+
"web_runner_create_project_label": "建立 WebRunner 專案",
82+
# Install Menu
83+
"install_menu_autocontrol": "安裝 AutoControl",
84+
"install_menu_apitestka": "安裝 APITestka",
85+
"install_menu_loaddensity": "安裝 LoadDensity",
86+
"install_menu_webrunner": "安裝 WebRunner",
87+
"install_menu_automation_file": "安裝 Automation File",
88+
"install_menu_mail_thunder": "安裝 MailThunder",
89+
"install_menu_tools_install_menu_label": "工具",
90+
"install_menu_tools_install_build_tools": "安裝 Build Tools",
91+
# Tools Menu
92+
"tools_menu_re_edge_gpt_label": "ReEdgeGPT",
93+
"tools_menu_re_edge_gpt_doc_label": "開啟 ReEdgeGPT 文件",
94+
"tools_menu_re_edge_gpt_doc_tab_label": "ReEdgeGPT 文件",
95+
"tools_menu_re_edge_gpt_github_label": "開啟 ReEdgeGPT GitHub",
96+
"tools_menu_re_edge_gpt_github_tab_label": "ReEdgeGPT GitHub",
97+
}
98+
)
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
from automation_editor.automation_editor_ui.extend_multi_language.extend_english import update_english_word_dict
2+
from automation_editor.automation_editor_ui.extend_multi_language.extend_traditional_chinese import \
3+
update_traditional_chinese_word_dict
4+
5+
6+
def update_language_dict():
7+
update_traditional_chinese_word_dict()
8+
update_english_word_dict()

0 commit comments

Comments
 (0)