io4it 3.0.4.1__tar.gz → 3.0.5.99__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- io4it-3.0.5.99/PKG-INFO +7 -0
- io4it-3.0.5.99/io4it.egg-info/PKG-INFO +7 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/io4it.egg-info/SOURCES.txt +3 -0
- io4it-3.0.5.99/io4it.egg-info/requires.txt +25 -0
- io4it-3.0.5.99/orangecontrib/IO4IT/toolViews/designer/key_manager_ui.ui +145 -0
- io4it-3.0.5.99/orangecontrib/IO4IT/toolViews/key_manager_ui.py +267 -0
- io4it-3.0.5.99/orangecontrib/IO4IT/utils/audio.py +284 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/utils/keys_manager.py +256 -28
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/utils/mail.py +26 -5
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/utils/secret_manager.py +300 -300
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/utils/utils_md.py +0 -19
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/OWExportMarkdown.py +13 -1
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/OWInboxMailMonitoring.py +0 -4
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/OWMD2HTML.py +3 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/OWMarkdownizer.py +8 -44
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/OWParserHTML.py +1 -0
- io4it-3.0.5.99/orangecontrib/IO4IT/widgets/OWSpeechToText.py +200 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/designer/ow_json_to_data_table.ui +17 -4
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/designer/owspeechtotext.ui +62 -56
- {io4it-3.0.4.1 → io4it-3.0.5.99}/setup.py +10 -11
- io4it-3.0.4.1/PKG-INFO +0 -38
- io4it-3.0.4.1/io4it.egg-info/PKG-INFO +0 -38
- io4it-3.0.4.1/io4it.egg-info/requires.txt +0 -26
- io4it-3.0.4.1/orangecontrib/IO4IT/widgets/OWSpeechToText.py +0 -367
- {io4it-3.0.4.1 → io4it-3.0.5.99}/io4it.egg-info/dependency_links.txt +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/io4it.egg-info/entry_points.txt +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/io4it.egg-info/namespace_packages.txt +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/io4it.egg-info/top_level.txt +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/__init__.py +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/ocr_function/__init__.py +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/ocr_function/word_converter.py +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/utils/__init__.py +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/utils/pool_exec_utils.py +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/OWChatGpt.py +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/OWDeep_Search.py +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/OWDoclingASR.py +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/OWDoclingToMarkdown.py +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/OWExtractTablesDocxToXlsx.py +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/OWJsonToDataTable.py +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/OWMarkdownLoader.py +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/OWOfficeNormalizer.py +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/OWPdfType.py +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/OWProcessPoolExecutor.py +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/OWS3Uploader.py +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/OWS3downloader.py +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/OWS3list.py +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/OWWebSearch.py +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/OWmailLoader.py +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/OWmailSender.py +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/OWwordpdf2docx.py +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/__init__.py +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/designer/__init__.py +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/designer/nogui.ui +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/designer/ow_extract_tables_docx_to_xlsx.ui +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/designer/ow_file_ext_selector.ui +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/designer/owchatgpt.ui +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/designer/owdeepsearch.ui +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/designer/owdoclingasr.ui +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/designer/owdoclingtomarkdown.ui +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/designer/owexportmarkdown.ui +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/designer/owinboxmailmonitoring.ui +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/designer/owmailloader.ui +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/designer/owmailsender.ui +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/designer/owmarkdownizer.ui +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/designer/owmarkdownloader.ui +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/designer/owmd2html.ui +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/designer/owofficenormalizer.ui +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/designer/owparserhtml.ui +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/designer/owpdftype.ui +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/designer/owprocesspoolexecutor.ui +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/designer/owvisualizationer.ui +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/designer/owwebsearch.ui +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/designer/wordpdf2docx.ui +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/icons/__init__.py +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/icons/chatgpt.png +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/icons/check_pdf.png +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/icons/deepsearch.svg +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/icons/dep_md_old.png +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/icons/download.png +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/icons/export_md.png +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/icons/extract_table.png +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/icons/file_extensor.png +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/icons/html.png +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/icons/json-file.png +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/icons/list_aws.png +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/icons/load_md.png +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/icons/mail_loader.png +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/icons/mail_writer.png +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/icons/md.png +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/icons/monitor-email.svg +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/icons/office_normalizer.png +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/icons/owmd2html.svg +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/icons/process_pool_executor.png +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/icons/speech_to_text.png +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/icons/upload.png +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/icons/visualizationer.png +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/icons/websearch.png +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/icons/wordpdf2docx.png +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/IO4IT/widgets/icons_dev/__init__.py +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/orangecontrib/__init__.py +0 -0
- {io4it-3.0.4.1 → io4it-3.0.5.99}/setup.cfg +0 -0
io4it-3.0.5.99/PKG-INFO
ADDED
|
@@ -11,6 +11,7 @@ orangecontrib/IO4IT/__init__.py
|
|
|
11
11
|
orangecontrib/IO4IT/ocr_function/__init__.py
|
|
12
12
|
orangecontrib/IO4IT/ocr_function/word_converter.py
|
|
13
13
|
orangecontrib/IO4IT/utils/__init__.py
|
|
14
|
+
orangecontrib/IO4IT/utils/audio.py
|
|
14
15
|
orangecontrib/IO4IT/utils/keys_manager.py
|
|
15
16
|
orangecontrib/IO4IT/utils/mail.py
|
|
16
17
|
orangecontrib/IO4IT/utils/pool_exec_utils.py
|
|
@@ -40,6 +41,8 @@ orangecontrib/IO4IT/widgets/OWmailLoader.py
|
|
|
40
41
|
orangecontrib/IO4IT/widgets/OWmailSender.py
|
|
41
42
|
orangecontrib/IO4IT/widgets/OWwordpdf2docx.py
|
|
42
43
|
orangecontrib/IO4IT/widgets/__init__.py
|
|
44
|
+
orangecontrib/IO4IT/widgets/../toolViews/key_manager_ui.py
|
|
45
|
+
orangecontrib/IO4IT/widgets/../toolViews/designer/key_manager_ui.ui
|
|
43
46
|
orangecontrib/IO4IT/widgets/designer/__init__.py
|
|
44
47
|
orangecontrib/IO4IT/widgets/designer/nogui.ui
|
|
45
48
|
orangecontrib/IO4IT/widgets/designer/ow_extract_tables_docx_to_xlsx.ui
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
torchvision
|
|
2
|
+
torchaudio
|
|
3
|
+
torch
|
|
4
|
+
pylatexenc
|
|
5
|
+
docopt
|
|
6
|
+
boto3
|
|
7
|
+
opencv-python-headless
|
|
8
|
+
docling
|
|
9
|
+
docling-core
|
|
10
|
+
speechbrain
|
|
11
|
+
whisper
|
|
12
|
+
whisper-openai
|
|
13
|
+
pyannote.audio
|
|
14
|
+
pyannote-core
|
|
15
|
+
pypandoc
|
|
16
|
+
pypandoc-binary
|
|
17
|
+
scikit-learn
|
|
18
|
+
openai
|
|
19
|
+
pip-system-certs
|
|
20
|
+
docx2pdf
|
|
21
|
+
msal
|
|
22
|
+
exchangelib
|
|
23
|
+
html2text
|
|
24
|
+
ddgs
|
|
25
|
+
CATEGORIT
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<ui version="4.0">
|
|
3
|
+
<class>KeyManagerUI</class>
|
|
4
|
+
<widget class="QDialog" name="KeyManagerUI">
|
|
5
|
+
<property name="geometry">
|
|
6
|
+
<rect>
|
|
7
|
+
<x>0</x>
|
|
8
|
+
<y>0</y>
|
|
9
|
+
<width>479</width>
|
|
10
|
+
<height>387</height>
|
|
11
|
+
</rect>
|
|
12
|
+
</property>
|
|
13
|
+
<property name="windowTitle">
|
|
14
|
+
<string>Key Manager</string>
|
|
15
|
+
</property>
|
|
16
|
+
<property name="styleSheet">
|
|
17
|
+
<string notr="true">
|
|
18
|
+
QDialog {
|
|
19
|
+
background-color: #f5f7fa;
|
|
20
|
+
font-family: "Segoe UI", "Helvetica Neue", Arial;
|
|
21
|
+
font-size: 10pt;
|
|
22
|
+
}
|
|
23
|
+
QLabel {
|
|
24
|
+
font-size: 11pt;
|
|
25
|
+
font-weight: 600;
|
|
26
|
+
color: #333333;
|
|
27
|
+
}
|
|
28
|
+
QComboBox {
|
|
29
|
+
padding: 6px;
|
|
30
|
+
border-radius: 6px;
|
|
31
|
+
border: 1px solid #c0c4cc;
|
|
32
|
+
background: #ffffff;
|
|
33
|
+
}
|
|
34
|
+
QComboBox:hover {
|
|
35
|
+
border: 1px solid #409eff;
|
|
36
|
+
}
|
|
37
|
+
QPushButton {
|
|
38
|
+
min-width: 90px;
|
|
39
|
+
padding: 6px 12px;
|
|
40
|
+
border-radius: 6px;
|
|
41
|
+
border: 1px solid #dcdfe6;
|
|
42
|
+
background-color: #ffffff;
|
|
43
|
+
}
|
|
44
|
+
QPushButton:hover {
|
|
45
|
+
border: 1px solid #409eff;
|
|
46
|
+
}
|
|
47
|
+
</string>
|
|
48
|
+
</property>
|
|
49
|
+
<layout class="QVBoxLayout" name="verticalLayout">
|
|
50
|
+
<property name="spacing">
|
|
51
|
+
<number>12</number>
|
|
52
|
+
</property>
|
|
53
|
+
<property name="leftMargin">
|
|
54
|
+
<number>20</number>
|
|
55
|
+
</property>
|
|
56
|
+
<property name="topMargin">
|
|
57
|
+
<number>20</number>
|
|
58
|
+
</property>
|
|
59
|
+
<property name="rightMargin">
|
|
60
|
+
<number>20</number>
|
|
61
|
+
</property>
|
|
62
|
+
<property name="bottomMargin">
|
|
63
|
+
<number>20</number>
|
|
64
|
+
</property>
|
|
65
|
+
<item>
|
|
66
|
+
<widget class="QPushButton" name="pushButton_sync">
|
|
67
|
+
<property name="text">
|
|
68
|
+
<string>Synchronize the key manager with the store</string>
|
|
69
|
+
</property>
|
|
70
|
+
</widget>
|
|
71
|
+
</item>
|
|
72
|
+
<item>
|
|
73
|
+
<widget class="QLabel" name="labelTitle">
|
|
74
|
+
<property name="text">
|
|
75
|
+
<string>Select an action:</string>
|
|
76
|
+
</property>
|
|
77
|
+
</widget>
|
|
78
|
+
</item>
|
|
79
|
+
<item>
|
|
80
|
+
<widget class="QComboBox" name="comboActions">
|
|
81
|
+
<property name="editable">
|
|
82
|
+
<bool>false</bool>
|
|
83
|
+
</property>
|
|
84
|
+
</widget>
|
|
85
|
+
</item>
|
|
86
|
+
<item>
|
|
87
|
+
<widget class="QLabel" name="labelMode">
|
|
88
|
+
<property name="text">
|
|
89
|
+
<string>Key :</string>
|
|
90
|
+
</property>
|
|
91
|
+
</widget>
|
|
92
|
+
</item>
|
|
93
|
+
<item>
|
|
94
|
+
<widget class="QComboBox" name="comboMode">
|
|
95
|
+
<property name="editable">
|
|
96
|
+
<bool>false</bool>
|
|
97
|
+
</property>
|
|
98
|
+
</widget>
|
|
99
|
+
</item>
|
|
100
|
+
<item>
|
|
101
|
+
<widget class="QPushButton" name="pushButton_read">
|
|
102
|
+
<property name="text">
|
|
103
|
+
<string>Read</string>
|
|
104
|
+
</property>
|
|
105
|
+
</widget>
|
|
106
|
+
</item>
|
|
107
|
+
<item>
|
|
108
|
+
<widget class="QTextEdit" name="textDetails">
|
|
109
|
+
<property name="placeholderText">
|
|
110
|
+
<string>Optional notes, description or configuration details...</string>
|
|
111
|
+
</property>
|
|
112
|
+
</widget>
|
|
113
|
+
</item>
|
|
114
|
+
<item>
|
|
115
|
+
<spacer name="verticalSpacer">
|
|
116
|
+
<property name="orientation">
|
|
117
|
+
<enum>Qt::Vertical</enum>
|
|
118
|
+
</property>
|
|
119
|
+
<property name="sizeHint" stdset="0">
|
|
120
|
+
<size>
|
|
121
|
+
<width>20</width>
|
|
122
|
+
<height>20</height>
|
|
123
|
+
</size>
|
|
124
|
+
</property>
|
|
125
|
+
</spacer>
|
|
126
|
+
</item>
|
|
127
|
+
<item>
|
|
128
|
+
<widget class="QPushButton" name="pushButton_write">
|
|
129
|
+
<property name="text">
|
|
130
|
+
<string>Write / Overwrite (⚠️ No confirmation)</string>
|
|
131
|
+
</property>
|
|
132
|
+
</widget>
|
|
133
|
+
</item>
|
|
134
|
+
<item>
|
|
135
|
+
<widget class="QPushButton" name="pushButton_delete">
|
|
136
|
+
<property name="text">
|
|
137
|
+
<string>Delete (⚠️ No confirmation)</string>
|
|
138
|
+
</property>
|
|
139
|
+
</widget>
|
|
140
|
+
</item>
|
|
141
|
+
</layout>
|
|
142
|
+
</widget>
|
|
143
|
+
<resources/>
|
|
144
|
+
<connections/>
|
|
145
|
+
</ui>
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
import sys
|
|
2
|
+
from AnyQt import QtWidgets
|
|
3
|
+
import os
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
if "site-packages/Orange/widgets" in os.path.dirname(os.path.abspath(__file__)).replace("\\", "/"):
|
|
7
|
+
from Orange.widgets.orangecontrib.AAIT.utils.import_uic import uic
|
|
8
|
+
from Orange.widgets.orangecontrib.IO4IT.utils import keys_manager
|
|
9
|
+
from Orange.widgets.orangecontrib.AAIT.utils.SimpleDialogQt import BoxError,BoxInfo
|
|
10
|
+
else:
|
|
11
|
+
from orangecontrib.AAIT.utils.import_uic import uic
|
|
12
|
+
from orangecontrib.IO4IT.utils import keys_manager
|
|
13
|
+
from orangecontrib.AAIT.utils.SimpleDialogQt import BoxError,BoxInfo
|
|
14
|
+
FUNCTION_NAMES = [
|
|
15
|
+
"Create / overwrite api key",
|
|
16
|
+
"Create / overwrite imap4_ssl configuration",
|
|
17
|
+
"Create / overwrite nxp configuration",
|
|
18
|
+
"Create / overwrite owa configuration",
|
|
19
|
+
"Create / overwrite oauth2 configuration",
|
|
20
|
+
"Read api key",
|
|
21
|
+
"Read imap4_ssl configuration",
|
|
22
|
+
"Read nxp configuration",
|
|
23
|
+
"Read owa configuration",
|
|
24
|
+
"Read oauth2 configuration",
|
|
25
|
+
]
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class KeyManagerUI(QtWidgets.QDialog):
|
|
29
|
+
def __init__(self, parent=None):
|
|
30
|
+
super().__init__(parent)
|
|
31
|
+
the_gui = os.path.join(os.path.dirname(os.path.abspath(__file__)), "designer/key_manager_ui.ui")
|
|
32
|
+
the_gui=the_gui.replace("\\","/")
|
|
33
|
+
uic.loadUi(the_gui, self)
|
|
34
|
+
|
|
35
|
+
# Remplir la combo
|
|
36
|
+
self.comboActions.addItems(FUNCTION_NAMES)
|
|
37
|
+
|
|
38
|
+
# signaux OK / Cancel
|
|
39
|
+
|
|
40
|
+
self.comboActions.currentTextChanged.connect(self.on_current_text_changed)
|
|
41
|
+
self.pushButton_read.clicked.connect(self.populate_textDetails)
|
|
42
|
+
self.pushButton_delete.clicked.connect(self.handle_delete_clicked)
|
|
43
|
+
self.pushButton_write.clicked.connect(self.handle_write_clicked)
|
|
44
|
+
self.pushButton_sync.clicked.connect(self.handle_pushButton_sync_clicked)
|
|
45
|
+
self.adjustSize()
|
|
46
|
+
self.setFixedSize(self.size())
|
|
47
|
+
self.comboMode.setVisible(False)
|
|
48
|
+
self.labelMode.setVisible(False)
|
|
49
|
+
self.pushButton_read.setVisible(False)
|
|
50
|
+
self.pushButton_delete.setVisible(False)
|
|
51
|
+
self.set_stdtextDetails("Create / overwrite api key")
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
def handle_write_clicked(self):
|
|
55
|
+
current_str=str(self.textDetails.toPlainText())
|
|
56
|
+
|
|
57
|
+
if current_str=="":
|
|
58
|
+
return
|
|
59
|
+
|
|
60
|
+
func_name = str(self.comboActions.currentText())
|
|
61
|
+
if func_name in ["Create / overwrite api key", "Read api key" ]:
|
|
62
|
+
try:
|
|
63
|
+
keys_manager.parse_json_and_save_api(current_str)
|
|
64
|
+
except Exception as e:
|
|
65
|
+
print(e)
|
|
66
|
+
BoxError(str(e))
|
|
67
|
+
return
|
|
68
|
+
elif func_name in ["Create / overwrite imap4_ssl configuration", "Read imap4_ssl configuration"]:
|
|
69
|
+
try:
|
|
70
|
+
keys_manager.parse_json_and_save_ssl(current_str)
|
|
71
|
+
except Exception as e:
|
|
72
|
+
print(e)
|
|
73
|
+
BoxError(str(e))
|
|
74
|
+
return
|
|
75
|
+
elif func_name in ["Create / overwrite nxp configuration", "Read nxp configuration"]:
|
|
76
|
+
try:
|
|
77
|
+
keys_manager.parse_json_and_save_nxp(current_str)
|
|
78
|
+
except Exception as e:
|
|
79
|
+
print(e)
|
|
80
|
+
BoxError(str(e))
|
|
81
|
+
return
|
|
82
|
+
elif func_name in ["Create / overwrite owa configuration", "Read owa configuration"]:
|
|
83
|
+
try:
|
|
84
|
+
keys_manager.parse_json_and_save_owa(current_str)
|
|
85
|
+
except Exception as e:
|
|
86
|
+
print(e)
|
|
87
|
+
BoxError(str(e))
|
|
88
|
+
return
|
|
89
|
+
elif func_name in ["Create / overwrite oauth2 configuration", "Read oauth2 configuration"]:
|
|
90
|
+
try:
|
|
91
|
+
keys_manager.parse_json_and_save_oauth2(current_str)
|
|
92
|
+
except Exception as e:
|
|
93
|
+
print(e)
|
|
94
|
+
BoxError(str(e))
|
|
95
|
+
return
|
|
96
|
+
BoxInfo("Done")
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
def handle_delete_clicked(self):
|
|
101
|
+
if str(self.comboMode.currentText())=="":
|
|
102
|
+
return
|
|
103
|
+
func_name = str(self.comboActions.currentText())
|
|
104
|
+
if func_name in ["Create / overwrite api key", "Read api key"]:
|
|
105
|
+
try:
|
|
106
|
+
keys_manager.delete_secret("API",str(self.comboMode.currentText()))
|
|
107
|
+
except Exception as e:
|
|
108
|
+
print(e)
|
|
109
|
+
BoxError(str(e))
|
|
110
|
+
return
|
|
111
|
+
elif func_name in ["Create / overwrite imap4_ssl configuration", "Read imap4_ssl configuration"]:
|
|
112
|
+
try:
|
|
113
|
+
keys_manager.delete_secret("IMAP4_SSL",str(self.comboMode.currentText()))
|
|
114
|
+
except Exception as e:
|
|
115
|
+
print(e)
|
|
116
|
+
BoxError(str(e))
|
|
117
|
+
return
|
|
118
|
+
elif func_name in ["Create / overwrite nxp configuration", "Read nxp configuration"]:
|
|
119
|
+
try:
|
|
120
|
+
keys_manager.delete_secret("NXP",str(self.comboMode.currentText()))
|
|
121
|
+
except Exception as e:
|
|
122
|
+
print(e)
|
|
123
|
+
BoxError(str(e))
|
|
124
|
+
return
|
|
125
|
+
elif func_name in ["Create / overwrite owa configuration", "Read owa configuration"]:
|
|
126
|
+
try:
|
|
127
|
+
keys_manager.delete_secret("MICROSOFT_EXCHANGE_OWA",str(self.comboMode.currentText()))
|
|
128
|
+
except Exception as e:
|
|
129
|
+
print(e)
|
|
130
|
+
BoxError(str(e))
|
|
131
|
+
return
|
|
132
|
+
elif func_name in ["Create / overwrite oauth2 configuration", "Read oauth2 configuration"]:
|
|
133
|
+
try:
|
|
134
|
+
keys_manager.delete_secret("MICROSOFT_EXCHANGE_OAUTH2",str(self.comboMode.currentText()) )
|
|
135
|
+
except Exception as e:
|
|
136
|
+
print(e)
|
|
137
|
+
BoxError(str(e))
|
|
138
|
+
return
|
|
139
|
+
else:
|
|
140
|
+
BoxError("Invalid function")
|
|
141
|
+
return
|
|
142
|
+
if func_name == "Read api key":
|
|
143
|
+
self.populate_combo_mode_from_folder(keys_manager.get_keys_dir("API"))
|
|
144
|
+
elif func_name == "Read imap4_ssl configuration":
|
|
145
|
+
self.populate_combo_mode_from_folder(keys_manager.get_keys_dir("IMAP4_SSL"))
|
|
146
|
+
elif func_name == "Read owa configuration":
|
|
147
|
+
self.populate_combo_mode_from_folder(keys_manager.get_keys_dir("MICROSOFT_EXCHANGE_OWA"))
|
|
148
|
+
elif func_name == "Read nxp configuration":
|
|
149
|
+
self.populate_combo_mode_from_folder(keys_manager.get_keys_dir("NXP"))
|
|
150
|
+
elif func_name == "Read oauth2 configuration":
|
|
151
|
+
self.populate_combo_mode_from_folder(keys_manager.get_keys_dir("MICROSOFT_EXCHANGE_OAUTH2"))
|
|
152
|
+
BoxInfo("Done")
|
|
153
|
+
|
|
154
|
+
def set_stdtextDetails(self,func_name):
|
|
155
|
+
if func_name=="Create / overwrite api key":
|
|
156
|
+
self.textDetails.setText("{\n'service': 'service_name',\n'api_key': 'api_key',\n'description': 'this_is_a_description'\n}")
|
|
157
|
+
elif func_name=="Create / overwrite imap4_ssl configuration":
|
|
158
|
+
self.textDetails.setText("{\n'agent': 'service_name',\n'alias': 'alias_name',\n'domain': '@domain.com',\n'interval_second': 1,\n'password': 'password'\n}")
|
|
159
|
+
elif func_name=="Create / overwrite nxp configuration":
|
|
160
|
+
self.textDetails.setText("{\n'dossier_node_id': 'bode_key',\n'serveur': 'servor_adress',\n'username': 'my_username',\n'password': 'password',\n'description': 'this is a description'\n}")
|
|
161
|
+
elif func_name=="Create / overwrite owa configuration":
|
|
162
|
+
self.textDetails.setText("{\n'alias': 'nom2@domain2.com',\n'interval_second': 1,\n'mail': 'nom@domain.com',\n'password_encrypted': 'password',\n'server': 'toto.titi.tata',\n'username': 'domaine\\username'\n}")
|
|
163
|
+
elif func_name=="Create / overwrite oauth2 configuration":
|
|
164
|
+
self.textDetails.setText("{\n'client_id': 'my_client_id',\n'client_secret':\n'my_client_secret',\n'tenant_id': 'my_guid_azure',\n'user_email': 'mail@domain.com'\n}")
|
|
165
|
+
else:
|
|
166
|
+
self.textDetails.setText("")
|
|
167
|
+
def populate_combo_mode_from_folder(self, folder_path):
|
|
168
|
+
# Nettoyer avant tout
|
|
169
|
+
self.comboMode.clear()
|
|
170
|
+
# Vérification du dossier
|
|
171
|
+
if not folder_path or not os.path.isdir(folder_path):
|
|
172
|
+
return # dossier invalide → combo purgé, masqué
|
|
173
|
+
# Recherche des fichiers .sec
|
|
174
|
+
sec_files = [
|
|
175
|
+
f for f in os.listdir(folder_path)
|
|
176
|
+
if f.lower().endswith(".sec") and os.path.isfile(os.path.join(folder_path, f))
|
|
177
|
+
]
|
|
178
|
+
# Si aucun fichier trouvé → juste retour (combo reste masqué)
|
|
179
|
+
if not sec_files:
|
|
180
|
+
return
|
|
181
|
+
|
|
182
|
+
# Peupler le combo
|
|
183
|
+
for filename in sec_files:
|
|
184
|
+
basename = filename[:-4] # retire ".sec"
|
|
185
|
+
# stocker le vrai nom en data interne Qt
|
|
186
|
+
self.comboMode.addItem(basename, filename)
|
|
187
|
+
self.comboMode.setCurrentIndex(0)
|
|
188
|
+
|
|
189
|
+
def populate_textDetails(self):
|
|
190
|
+
self.textDetails.setText("")
|
|
191
|
+
func_name = str(self.comboActions.currentText())
|
|
192
|
+
if func_name=="":
|
|
193
|
+
return
|
|
194
|
+
key_name =str(self.comboMode.currentText())
|
|
195
|
+
if key_name=="":
|
|
196
|
+
return
|
|
197
|
+
if func_name == "Read api key":
|
|
198
|
+
self.textDetails.setText(str(keys_manager.lire_config_api(key_name)).replace('\\\\','\\'))
|
|
199
|
+
if func_name == "Read imap4_ssl configuration":
|
|
200
|
+
self.textDetails.setText(str(keys_manager.lire_config_imap4_ssl_dict_sec(key_name)).replace('\\\\','\\'))
|
|
201
|
+
if func_name == "Read owa configuration":
|
|
202
|
+
self.textDetails.setText(str(keys_manager.lire_config_owa_dict_sec(key_name)).replace('\\\\','\\'))
|
|
203
|
+
if func_name == "Read nxp configuration":
|
|
204
|
+
self.textDetails.setText(str(keys_manager.lire_config_nxp(key_name)).replace('\\\\','\\'))
|
|
205
|
+
if func_name == "Read oauth2 configuration":
|
|
206
|
+
self.textDetails.setText(str(keys_manager.lire_config_oauth2_dict_sec(key_name)).replace('\\\\','\\'))
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
def on_current_text_changed(self):
|
|
211
|
+
self.textDetails.setText("")
|
|
212
|
+
func_name = str(self.comboActions.currentText())
|
|
213
|
+
self.comboMode.clear()
|
|
214
|
+
self.pushButton_read.setVisible(False)
|
|
215
|
+
self.pushButton_delete.setVisible(False)
|
|
216
|
+
if func_name in (
|
|
217
|
+
"Read api key",
|
|
218
|
+
"Read imap4_ssl configuration",
|
|
219
|
+
"Read owa configuration",
|
|
220
|
+
"Read nxp configuration",
|
|
221
|
+
"Read oauth2 configuration"
|
|
222
|
+
):
|
|
223
|
+
self.textDetails.setVisible(True)
|
|
224
|
+
self.pushButton_read.setVisible(True)
|
|
225
|
+
self.pushButton_delete.setVisible(True)
|
|
226
|
+
self.comboMode.setVisible(True)
|
|
227
|
+
self.labelMode.setVisible(True)
|
|
228
|
+
if func_name=="Read api key":
|
|
229
|
+
self.populate_combo_mode_from_folder(keys_manager.get_keys_dir("API"))
|
|
230
|
+
elif func_name=="Read imap4_ssl configuration":
|
|
231
|
+
self.populate_combo_mode_from_folder(keys_manager.get_keys_dir("IMAP4_SSL"))
|
|
232
|
+
elif func_name=="Read owa configuration":
|
|
233
|
+
self.populate_combo_mode_from_folder(keys_manager.get_keys_dir("MICROSOFT_EXCHANGE_OWA"))
|
|
234
|
+
elif func_name=="Read nxp configuration":
|
|
235
|
+
self.populate_combo_mode_from_folder(keys_manager.get_keys_dir("NXP"))
|
|
236
|
+
elif func_name=="Read oauth2 configuration":
|
|
237
|
+
self.populate_combo_mode_from_folder(keys_manager.get_keys_dir("MICROSOFT_EXCHANGE_OAUTH2"))
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
self.textDetails.setVisible(True)
|
|
242
|
+
else:
|
|
243
|
+
self.set_stdtextDetails(func_name)
|
|
244
|
+
self.comboMode.setVisible(False)
|
|
245
|
+
self.labelMode.setVisible(False)
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
def handle_pushButton_sync_clicked(self):
|
|
249
|
+
keys_manager.recreate_all_sec_file()
|
|
250
|
+
BoxInfo("Done")
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
def main():
|
|
255
|
+
app = QtWidgets.QApplication(sys.argv)
|
|
256
|
+
dlg = KeyManagerUI()
|
|
257
|
+
dlg.show()
|
|
258
|
+
if hasattr(app, "exec"):
|
|
259
|
+
app.exec()
|
|
260
|
+
else:
|
|
261
|
+
app.exec_()
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
if __name__ == "__main__":
|
|
267
|
+
main()
|