io4it 2.1.0.8__tar.gz → 2.1.1.1__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-2.1.1.1/PKG-INFO +33 -0
- io4it-2.1.1.1/io4it.egg-info/PKG-INFO +33 -0
- {io4it-2.1.0.8 → io4it-2.1.1.1}/io4it.egg-info/SOURCES.txt +5 -1
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/IO4IT/utils/utils_md.py +1 -2
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/IO4IT/widgets/OWDoclingMarkdownizerSimple.py +33 -6
- io4it-2.1.1.1/orangecontrib/IO4IT/widgets/OWInboxMailMonitoring.py +214 -0
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/IO4IT/widgets/OWMarkdownLoader.py +2 -2
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/IO4IT/widgets/OWMarkdownizer.py +2 -4
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/IO4IT/widgets/OWOfficeNormalizer.py +27 -5
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/IO4IT/widgets/OWPdfType.py +48 -6
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/IO4IT/widgets/OWProcessPoolExecutor.py +2 -3
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/IO4IT/widgets/OWS3Uploader.py +3 -4
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/IO4IT/widgets/OWwordpdf2docx.py +32 -5
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/IO4IT/widgets/designer/ow_file_ext_selector.ui +37 -5
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/IO4IT/widgets/designer/owchatgpt.ui +18 -2
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/IO4IT/widgets/designer/owdeepsearch.ui +34 -2
- io4it-2.1.1.1/orangecontrib/IO4IT/widgets/designer/owdoclingasr.ui +86 -0
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/IO4IT/widgets/designer/owdoclingmarkdownizersimple.ui +34 -2
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/IO4IT/widgets/designer/owexportmarkdown.ui +33 -1
- io4it-2.1.1.1/orangecontrib/IO4IT/widgets/designer/owinboxmailmonitoring.ui +113 -0
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/IO4IT/widgets/designer/owmailloader.ui +43 -11
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/IO4IT/widgets/designer/owmailsender.ui +43 -11
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/IO4IT/widgets/designer/owmarkdownloader.ui +40 -8
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/IO4IT/widgets/designer/owofficenormalizer.ui +34 -2
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/IO4IT/widgets/designer/owpdftype.ui +35 -3
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/IO4IT/widgets/designer/owprocesspoolexecutor.ui +38 -6
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/IO4IT/widgets/designer/owspeechtotext.ui +48 -3
- io4it-2.1.1.1/orangecontrib/IO4IT/widgets/designer/owvisualizationer.ui +101 -0
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/IO4IT/widgets/designer/wordpdf2docx.ui +36 -4
- io4it-2.1.1.1/orangecontrib/IO4IT/widgets/icons/monitor-email.svg +35 -0
- {io4it-2.1.0.8 → io4it-2.1.1.1}/setup.py +1 -1
- io4it-2.1.0.8/PKG-INFO +0 -7
- io4it-2.1.0.8/io4it.egg-info/PKG-INFO +0 -7
- {io4it-2.1.0.8 → io4it-2.1.1.1}/io4it.egg-info/dependency_links.txt +0 -0
- {io4it-2.1.0.8 → io4it-2.1.1.1}/io4it.egg-info/entry_points.txt +0 -0
- {io4it-2.1.0.8 → io4it-2.1.1.1}/io4it.egg-info/namespace_packages.txt +0 -0
- {io4it-2.1.0.8 → io4it-2.1.1.1}/io4it.egg-info/requires.txt +0 -0
- {io4it-2.1.0.8 → io4it-2.1.1.1}/io4it.egg-info/top_level.txt +0 -0
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/IO4IT/__init__.py +0 -0
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/IO4IT/ocr_function/__init__.py +0 -0
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/IO4IT/ocr_function/word_converter.py +0 -0
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/IO4IT/utils/__init__.py +0 -0
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/IO4IT/utils/mail.py +0 -0
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/IO4IT/utils/offuscation_basique.py +0 -0
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/IO4IT/utils/pool_exec_utils.py +0 -0
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/IO4IT/widgets/OWChatGpt.py +0 -0
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/IO4IT/widgets/OWDeep_Search.py +0 -0
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/IO4IT/widgets/OWExportMarkdown.py +0 -0
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/IO4IT/widgets/OWS3downloader.py +0 -0
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/IO4IT/widgets/OWS3list.py +0 -0
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/IO4IT/widgets/OWSpeechToText.py +0 -0
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/IO4IT/widgets/OWmailLoader.py +0 -0
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/IO4IT/widgets/OWmailSender.py +0 -0
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/IO4IT/widgets/__init__.py +0 -0
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/IO4IT/widgets/designer/__init__.py +0 -0
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/IO4IT/widgets/designer/nogui.ui +0 -0
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/IO4IT/widgets/designer/owmarkdownizer.ui +0 -0
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/IO4IT/widgets/icons/__init__.py +0 -0
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/IO4IT/widgets/icons/chatgpt.png +0 -0
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/IO4IT/widgets/icons/check_pdf.png +0 -0
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/IO4IT/widgets/icons/deepsearch.svg +0 -0
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/IO4IT/widgets/icons/dep_md_old.png +0 -0
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/IO4IT/widgets/icons/download.png +0 -0
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/IO4IT/widgets/icons/export_md.png +0 -0
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/IO4IT/widgets/icons/file_extensor.png +0 -0
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/IO4IT/widgets/icons/list_aws.png +0 -0
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/IO4IT/widgets/icons/load_md.png +0 -0
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/IO4IT/widgets/icons/mail_loader.png +0 -0
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/IO4IT/widgets/icons/mail_writer.png +0 -0
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/IO4IT/widgets/icons/md.png +0 -0
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/IO4IT/widgets/icons/office_normalizer.png +0 -0
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/IO4IT/widgets/icons/process_pool_executor.png +0 -0
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/IO4IT/widgets/icons/speech_to_text.png +0 -0
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/IO4IT/widgets/icons/upload.png +0 -0
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/IO4IT/widgets/icons/visualizationer.png +0 -0
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/IO4IT/widgets/icons/wordpdf2docx.png +0 -0
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/IO4IT/widgets/icons_dev/__init__.py +0 -0
- {io4it-2.1.0.8 → io4it-2.1.1.1}/orangecontrib/__init__.py +0 -0
- {io4it-2.1.0.8 → io4it-2.1.1.1}/setup.cfg +0 -0
io4it-2.1.1.1/PKG-INFO
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: io4it
|
|
3
|
+
Version: 2.1.1.1
|
|
4
|
+
Summary: UNKNOWN
|
|
5
|
+
Home-page:
|
|
6
|
+
Author:
|
|
7
|
+
Author-email:
|
|
8
|
+
License: UNKNOWN
|
|
9
|
+
Keywords: orange3 add-on
|
|
10
|
+
Platform: UNKNOWN
|
|
11
|
+
Requires-Dist: pylatexenc
|
|
12
|
+
Requires-Dist: docopt
|
|
13
|
+
Requires-Dist: boto3
|
|
14
|
+
Requires-Dist: opencv-python-headless==4.6.0.66
|
|
15
|
+
Requires-Dist: docling==2.30.0
|
|
16
|
+
Requires-Dist: docling-core==2.26.3
|
|
17
|
+
Requires-Dist: speechbrain
|
|
18
|
+
Requires-Dist: whisper
|
|
19
|
+
Requires-Dist: whisper-openai
|
|
20
|
+
Requires-Dist: pyannote.audio
|
|
21
|
+
Requires-Dist: pyannote-core
|
|
22
|
+
Requires-Dist: pypandoc
|
|
23
|
+
Requires-Dist: pypandoc-binary
|
|
24
|
+
Requires-Dist: scikit-learn
|
|
25
|
+
Requires-Dist: openai
|
|
26
|
+
Requires-Dist: pip-system-certs==5.0
|
|
27
|
+
Requires-Dist: docx2pdf
|
|
28
|
+
Requires-Dist: doc2docx
|
|
29
|
+
Requires-Dist: msal
|
|
30
|
+
Requires-Dist: exchangelib
|
|
31
|
+
Requires-Dist: CATEGORIT
|
|
32
|
+
|
|
33
|
+
UNKNOWN
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: io4it
|
|
3
|
+
Version: 2.1.1.1
|
|
4
|
+
Summary: UNKNOWN
|
|
5
|
+
Home-page:
|
|
6
|
+
Author:
|
|
7
|
+
Author-email:
|
|
8
|
+
License: UNKNOWN
|
|
9
|
+
Keywords: orange3 add-on
|
|
10
|
+
Platform: UNKNOWN
|
|
11
|
+
Requires-Dist: pylatexenc
|
|
12
|
+
Requires-Dist: docopt
|
|
13
|
+
Requires-Dist: boto3
|
|
14
|
+
Requires-Dist: opencv-python-headless==4.6.0.66
|
|
15
|
+
Requires-Dist: docling==2.30.0
|
|
16
|
+
Requires-Dist: docling-core==2.26.3
|
|
17
|
+
Requires-Dist: speechbrain
|
|
18
|
+
Requires-Dist: whisper
|
|
19
|
+
Requires-Dist: whisper-openai
|
|
20
|
+
Requires-Dist: pyannote.audio
|
|
21
|
+
Requires-Dist: pyannote-core
|
|
22
|
+
Requires-Dist: pypandoc
|
|
23
|
+
Requires-Dist: pypandoc-binary
|
|
24
|
+
Requires-Dist: scikit-learn
|
|
25
|
+
Requires-Dist: openai
|
|
26
|
+
Requires-Dist: pip-system-certs==5.0
|
|
27
|
+
Requires-Dist: docx2pdf
|
|
28
|
+
Requires-Dist: doc2docx
|
|
29
|
+
Requires-Dist: msal
|
|
30
|
+
Requires-Dist: exchangelib
|
|
31
|
+
Requires-Dist: CATEGORIT
|
|
32
|
+
|
|
33
|
+
UNKNOWN
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
setup.cfg
|
|
2
1
|
setup.py
|
|
3
2
|
io4it.egg-info/PKG-INFO
|
|
4
3
|
io4it.egg-info/SOURCES.txt
|
|
@@ -20,6 +19,7 @@ orangecontrib/IO4IT/widgets/OWChatGpt.py
|
|
|
20
19
|
orangecontrib/IO4IT/widgets/OWDeep_Search.py
|
|
21
20
|
orangecontrib/IO4IT/widgets/OWDoclingMarkdownizerSimple.py
|
|
22
21
|
orangecontrib/IO4IT/widgets/OWExportMarkdown.py
|
|
22
|
+
orangecontrib/IO4IT/widgets/OWInboxMailMonitoring.py
|
|
23
23
|
orangecontrib/IO4IT/widgets/OWMarkdownLoader.py
|
|
24
24
|
orangecontrib/IO4IT/widgets/OWMarkdownizer.py
|
|
25
25
|
orangecontrib/IO4IT/widgets/OWOfficeNormalizer.py
|
|
@@ -38,8 +38,10 @@ orangecontrib/IO4IT/widgets/designer/nogui.ui
|
|
|
38
38
|
orangecontrib/IO4IT/widgets/designer/ow_file_ext_selector.ui
|
|
39
39
|
orangecontrib/IO4IT/widgets/designer/owchatgpt.ui
|
|
40
40
|
orangecontrib/IO4IT/widgets/designer/owdeepsearch.ui
|
|
41
|
+
orangecontrib/IO4IT/widgets/designer/owdoclingasr.ui
|
|
41
42
|
orangecontrib/IO4IT/widgets/designer/owdoclingmarkdownizersimple.ui
|
|
42
43
|
orangecontrib/IO4IT/widgets/designer/owexportmarkdown.ui
|
|
44
|
+
orangecontrib/IO4IT/widgets/designer/owinboxmailmonitoring.ui
|
|
43
45
|
orangecontrib/IO4IT/widgets/designer/owmailloader.ui
|
|
44
46
|
orangecontrib/IO4IT/widgets/designer/owmailsender.ui
|
|
45
47
|
orangecontrib/IO4IT/widgets/designer/owmarkdownizer.ui
|
|
@@ -48,6 +50,7 @@ orangecontrib/IO4IT/widgets/designer/owofficenormalizer.ui
|
|
|
48
50
|
orangecontrib/IO4IT/widgets/designer/owpdftype.ui
|
|
49
51
|
orangecontrib/IO4IT/widgets/designer/owprocesspoolexecutor.ui
|
|
50
52
|
orangecontrib/IO4IT/widgets/designer/owspeechtotext.ui
|
|
53
|
+
orangecontrib/IO4IT/widgets/designer/owvisualizationer.ui
|
|
51
54
|
orangecontrib/IO4IT/widgets/designer/wordpdf2docx.ui
|
|
52
55
|
orangecontrib/IO4IT/widgets/icons/__init__.py
|
|
53
56
|
orangecontrib/IO4IT/widgets/icons/chatgpt.png
|
|
@@ -62,6 +65,7 @@ orangecontrib/IO4IT/widgets/icons/load_md.png
|
|
|
62
65
|
orangecontrib/IO4IT/widgets/icons/mail_loader.png
|
|
63
66
|
orangecontrib/IO4IT/widgets/icons/mail_writer.png
|
|
64
67
|
orangecontrib/IO4IT/widgets/icons/md.png
|
|
68
|
+
orangecontrib/IO4IT/widgets/icons/monitor-email.svg
|
|
65
69
|
orangecontrib/IO4IT/widgets/icons/office_normalizer.png
|
|
66
70
|
orangecontrib/IO4IT/widgets/icons/process_pool_executor.png
|
|
67
71
|
orangecontrib/IO4IT/widgets/icons/speech_to_text.png
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
import os, time
|
|
1
|
+
import os, time
|
|
2
2
|
from pathlib import Path
|
|
3
3
|
from concurrent.futures import as_completed
|
|
4
4
|
|
|
5
|
-
from AnyQt.QtWidgets import QLabel
|
|
5
|
+
from AnyQt.QtWidgets import QLabel
|
|
6
6
|
from AnyQt.QtCore import pyqtSignal
|
|
7
7
|
from Orange.widgets import widget
|
|
8
8
|
from Orange.widgets.utils.signals import Input, Output
|
|
9
9
|
from Orange.data import Domain, StringVariable, Table, DiscreteVariable
|
|
10
10
|
|
|
11
|
+
# --- Ajouts pour l'écriture Excel ---
|
|
12
|
+
from openpyxl import Workbook
|
|
13
|
+
|
|
11
14
|
# --- Docling (unique lib utilisée pour la conversion) ---
|
|
12
15
|
from docling.backend.pypdfium2_backend import PyPdfiumDocumentBackend
|
|
13
16
|
from docling.datamodel.base_models import InputFormat
|
|
@@ -208,9 +211,30 @@ class OWDoclingMarkdownizerSimple(widget.OWWidget):
|
|
|
208
211
|
self.Outputs.status_data.send(status_table)
|
|
209
212
|
|
|
210
213
|
def _run_conversion(self, files, progress_callback):
|
|
211
|
-
"""Main function to run the conversion, supports sequential and parallel modes."""
|
|
212
214
|
results = []
|
|
213
215
|
|
|
216
|
+
# Gère le chemin du fichier Excel
|
|
217
|
+
base_name = "conversion_results" # Nom de base pour le fichier Excel
|
|
218
|
+
# Définir le chemin du dossier de sortie de Docling
|
|
219
|
+
if files:
|
|
220
|
+
first_file_path = Path(files[0])
|
|
221
|
+
out_dir = first_file_path.parent / "conversion_markdown"
|
|
222
|
+
else:
|
|
223
|
+
out_dir = Path.cwd() / "conversion_markdown"
|
|
224
|
+
|
|
225
|
+
excel_path = out_dir / f"{base_name}.xlsx"
|
|
226
|
+
counter = 1
|
|
227
|
+
while excel_path.exists():
|
|
228
|
+
excel_path = out_dir / f"{base_name}_{counter}.xlsx"
|
|
229
|
+
counter += 1
|
|
230
|
+
|
|
231
|
+
# Initialise le classeur et la feuille Excel
|
|
232
|
+
wb = Workbook()
|
|
233
|
+
ws = wb.active
|
|
234
|
+
ws.title = "Conversion Results"
|
|
235
|
+
headers = ["input_path", "output_md", "status", "duration_sec", "message"]
|
|
236
|
+
ws.append(headers)
|
|
237
|
+
|
|
214
238
|
if self.external_executor is None:
|
|
215
239
|
# --- Mode simple séquentiel ---
|
|
216
240
|
for i, p in enumerate(files):
|
|
@@ -220,8 +244,8 @@ class OWDoclingMarkdownizerSimple(widget.OWWidget):
|
|
|
220
244
|
|
|
221
245
|
row = _convert_one_file(path_str)
|
|
222
246
|
results.append(row)
|
|
223
|
-
|
|
224
|
-
|
|
247
|
+
ws.append(row)
|
|
248
|
+
wb.save(excel_path)
|
|
225
249
|
self.status_update_signal.emit([row[0], row[2], row[4]])
|
|
226
250
|
|
|
227
251
|
progress_callback((i + 1) / len(files) * 100)
|
|
@@ -237,13 +261,16 @@ class OWDoclingMarkdownizerSimple(widget.OWWidget):
|
|
|
237
261
|
try:
|
|
238
262
|
row = fut.result()
|
|
239
263
|
results.append(row)
|
|
240
|
-
|
|
264
|
+
ws.append(row)
|
|
265
|
+
wb.save(excel_path)
|
|
241
266
|
self.status_update_signal.emit([row[0], row[2], row[4]])
|
|
242
267
|
except Exception as e:
|
|
243
268
|
# Gestion des erreurs de la future et envoi
|
|
244
269
|
row = [file_path_str, str((Path(file_path_str).parent / 'a_md' / f"{Path(file_path_str).stem}.md")),
|
|
245
270
|
"nok", "0.00", f"FutureError: {e}"]
|
|
246
271
|
results.append(row)
|
|
272
|
+
ws.append(row)
|
|
273
|
+
wb.save(excel_path)
|
|
247
274
|
self.status_update_signal.emit([row[0], "nok", f"FutureError: {e}"])
|
|
248
275
|
|
|
249
276
|
progress_callback(i / len(files) * 100)
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import sys
|
|
3
|
+
import Orange.data
|
|
4
|
+
from AnyQt.QtWidgets import QPushButton, QApplication, QRadioButton, QComboBox,QCheckBox,QLineEdit
|
|
5
|
+
from Orange.widgets import widget
|
|
6
|
+
from Orange.widgets.utils.signals import Input, Output
|
|
7
|
+
from Orange.widgets.settings import Setting
|
|
8
|
+
from Orange.data import StringVariable
|
|
9
|
+
|
|
10
|
+
if "site-packages/Orange/widgets" in os.path.dirname(os.path.abspath(__file__)).replace("\\", "/"):
|
|
11
|
+
from Orange.widgets.orangecontrib.AAIT.utils import thread_management
|
|
12
|
+
from Orange.widgets.orangecontrib.AAIT.utils.import_uic import uic
|
|
13
|
+
from Orange.widgets.orangecontrib.IO4IT.utils import mail
|
|
14
|
+
from Orange.widgets.orangecontrib.IO4IT.utils import offuscation_basique
|
|
15
|
+
from Orange.widgets.orangecontrib.AAIT.utils import MetManagement
|
|
16
|
+
else:
|
|
17
|
+
from orangecontrib.AAIT.utils import thread_management
|
|
18
|
+
from orangecontrib.AAIT.utils.import_uic import uic
|
|
19
|
+
from orangecontrib.IO4IT.utils import mail
|
|
20
|
+
from Orange.widgets.orangecontrib.IO4IT.utils import offuscation_basique
|
|
21
|
+
from orangecontrib.IO4IT.utils import offuscation_basique
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class OWInboxMailMonitoring(widget.OWWidget):
|
|
25
|
+
name = "InboxMailMonitoring"
|
|
26
|
+
description = "Runs daemonizer_no_input_output in a thread; passes data through."
|
|
27
|
+
icon = "icons/monitor-email.svg"
|
|
28
|
+
if "site-packages/Orange/widgets" in os.path.dirname(os.path.abspath(__file__)).replace("\\", "/"):
|
|
29
|
+
icon = "icons_dev/monitor-email.svg"
|
|
30
|
+
priority = 1091
|
|
31
|
+
gui = os.path.join(os.path.dirname(os.path.abspath(__file__)), "designer/owinboxmailmonitoring.ui")
|
|
32
|
+
want_control_area = False
|
|
33
|
+
category = "AAIT - API"
|
|
34
|
+
type_co:str=Setting("")
|
|
35
|
+
your_email_conf: str = Setting("")
|
|
36
|
+
send_mail = Setting("False")
|
|
37
|
+
|
|
38
|
+
class Inputs:
|
|
39
|
+
data = Input("Data", Orange.data.Table)
|
|
40
|
+
|
|
41
|
+
class Outputs:
|
|
42
|
+
data = Output("Data", Orange.data.Table)
|
|
43
|
+
|
|
44
|
+
def on_text_changed(self,new_text):
|
|
45
|
+
if new_text == self.type_co:
|
|
46
|
+
return # Rien à faire, pas de vrai changement
|
|
47
|
+
self.update_setting_from_qt_view()
|
|
48
|
+
|
|
49
|
+
def on_text_changed2(self):
|
|
50
|
+
self.your_email_conf = str(self.comboBox2.currentText())
|
|
51
|
+
|
|
52
|
+
def update_qt_view_from_settings(self):
|
|
53
|
+
if str(self.send_mail) == "True":
|
|
54
|
+
self.radioButton.setChecked(False)
|
|
55
|
+
self.radioButton2.setChecked(True)
|
|
56
|
+
else:
|
|
57
|
+
self.radioButton.setChecked(True)
|
|
58
|
+
self.radioButton2.setChecked(False)
|
|
59
|
+
|
|
60
|
+
index = self.comboBox.findText(str(self.type_co))
|
|
61
|
+
if index != -1:
|
|
62
|
+
self.comboBox.setCurrentIndex(index)
|
|
63
|
+
else:
|
|
64
|
+
self.comboBox.setCurrentIndex(0)
|
|
65
|
+
if self.type_co != "":
|
|
66
|
+
self.comboBox2.show()
|
|
67
|
+
offusc_conf_agents = mail.list_conf_files(self.type_co)
|
|
68
|
+
self.comboBox2.addItems(offusc_conf_agents)
|
|
69
|
+
index1 = self.comboBox2.findText(str(self.your_email_conf))
|
|
70
|
+
if index1 != -1:
|
|
71
|
+
self.comboBox2.setCurrentIndex(index1)
|
|
72
|
+
else:
|
|
73
|
+
self.comboBox2.setCurrentIndex(0)
|
|
74
|
+
self.pushButton.clicked.connect(self.run)
|
|
75
|
+
|
|
76
|
+
def update_setting_from_qt_view(self):
|
|
77
|
+
self.type_co=str(self.comboBox.currentText())
|
|
78
|
+
if self.type_co == "":
|
|
79
|
+
self.comboBox2.hide()
|
|
80
|
+
if self.type_co !="":
|
|
81
|
+
self.comboBox2.show()
|
|
82
|
+
self.comboBox2.clear()
|
|
83
|
+
offusc_conf_agents = mail.list_conf_files(self.type_co)
|
|
84
|
+
self.comboBox2.addItems(offusc_conf_agents)
|
|
85
|
+
if self.radioButton.isChecked():
|
|
86
|
+
self.send_mail = False
|
|
87
|
+
else:
|
|
88
|
+
self.send_mail = True
|
|
89
|
+
|
|
90
|
+
def __init__(self):
|
|
91
|
+
super().__init__()
|
|
92
|
+
|
|
93
|
+
self.setFixedWidth(700)
|
|
94
|
+
self.setFixedHeight(400)
|
|
95
|
+
uic.loadUi(self.gui, self)
|
|
96
|
+
|
|
97
|
+
self.comboBox = self.findChild(QComboBox, 'comboBox')
|
|
98
|
+
self.comboBox2 = self.findChild(QComboBox, 'comboBox_2')
|
|
99
|
+
self.radioButton = self.findChild(QRadioButton, 'radioButton')
|
|
100
|
+
self.radioButton2 = self.findChild(QRadioButton, 'radioButton_2')
|
|
101
|
+
self.pushButton = self.findChild(QPushButton, 'pushButton')
|
|
102
|
+
|
|
103
|
+
types_co = [
|
|
104
|
+
"",
|
|
105
|
+
"IMAP4_SSL",
|
|
106
|
+
"MICROSOFT_EXCHANGE_OWA",
|
|
107
|
+
"MICROSOFT_EXCHANGE_OAUTH2"
|
|
108
|
+
]
|
|
109
|
+
|
|
110
|
+
self.comboBox.addItems(types_co)
|
|
111
|
+
self.comboBox.currentTextChanged.connect(self.on_text_changed)
|
|
112
|
+
self.comboBox2.hide()
|
|
113
|
+
self.comboBox2.currentTextChanged.connect(self.on_text_changed2)
|
|
114
|
+
self.radioButton.clicked.connect(self.update_setting_from_qt_view)
|
|
115
|
+
self.radioButton2.clicked.connect(self.update_setting_from_qt_view)
|
|
116
|
+
self.pushButton.clicked.connect(self.run)
|
|
117
|
+
self.thread = None
|
|
118
|
+
self.data = None
|
|
119
|
+
self.data_to_send = None
|
|
120
|
+
self.input_dir = None
|
|
121
|
+
self.output_dir = None
|
|
122
|
+
self.post_initialized()
|
|
123
|
+
self.update_qt_view_from_settings()
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
@Inputs.data
|
|
127
|
+
def set_data(self, in_data):
|
|
128
|
+
self.data = in_data
|
|
129
|
+
self.run()
|
|
130
|
+
|
|
131
|
+
def _run_mail_daemonizer(self):
|
|
132
|
+
self.data_to_send = self.data
|
|
133
|
+
# on va lire la config en rapport pour renvoyer le dossier d'envoi et de reception
|
|
134
|
+
try:
|
|
135
|
+
agent = ""
|
|
136
|
+
if self.type_co == "IMAP4_SSL":
|
|
137
|
+
agent, _, _, _, alias = offuscation_basique.lire_config_imap4_ssl(self.your_email_conf)
|
|
138
|
+
if alias != "":
|
|
139
|
+
agent = alias
|
|
140
|
+
if self.type_co == "MICROSOFT_EXCHANGE_OWA":
|
|
141
|
+
_, agent, _, _, _, _ = offuscation_basique.lire_config_owa(self.your_email_conf)
|
|
142
|
+
if self.type_co == "MICROSOFT_EXCHANGE_OAUTH2":
|
|
143
|
+
_, _, _, agent = offuscation_basique.lire_config_cli_oauth2(self.your_email_conf)
|
|
144
|
+
if agent != "":
|
|
145
|
+
chemin_dossier = MetManagement.get_path_mailFolder()
|
|
146
|
+
self.input_dir = chemin_dossier + str(agent) + "/in"
|
|
147
|
+
self.output_dir = chemin_dossier + str(agent) + "/out"
|
|
148
|
+
input_dir = StringVariable("input_dir")
|
|
149
|
+
output_dir = StringVariable("output_dir")
|
|
150
|
+
self.data_to_send = self.data_to_send.add_column(input_dir, [self.input_dir])
|
|
151
|
+
self.data_to_send = self.data_to_send.add_column(output_dir, [self.output_dir])
|
|
152
|
+
except Exception as e:
|
|
153
|
+
self.error("An error occurred : ", e)
|
|
154
|
+
return
|
|
155
|
+
if self.send_mail:
|
|
156
|
+
mail.check_send_new_emails(self.your_email_conf, self.type_co)
|
|
157
|
+
else:
|
|
158
|
+
mail.check_new_emails(self.your_email_conf, self.type_co)
|
|
159
|
+
return
|
|
160
|
+
|
|
161
|
+
def run(self):
|
|
162
|
+
# if thread is running quit
|
|
163
|
+
if self.thread is not None:
|
|
164
|
+
self.thread.safe_quit()
|
|
165
|
+
|
|
166
|
+
if self.data is None:
|
|
167
|
+
return
|
|
168
|
+
|
|
169
|
+
if self.your_email_conf == "":
|
|
170
|
+
self.error("You need to select a configuration file")
|
|
171
|
+
return
|
|
172
|
+
|
|
173
|
+
if self.type_co == "":
|
|
174
|
+
self.error("You need to select a type of connection")
|
|
175
|
+
return
|
|
176
|
+
|
|
177
|
+
self.error("")
|
|
178
|
+
self.progressBarInit()
|
|
179
|
+
|
|
180
|
+
self.thread = thread_management.Thread(self._run_mail_daemonizer)
|
|
181
|
+
self.thread.progress.connect(self.handle_progress)
|
|
182
|
+
self.thread.result.connect(self.handle_result)
|
|
183
|
+
self.thread.finish.connect(self.handle_finish)
|
|
184
|
+
self.thread.start()
|
|
185
|
+
|
|
186
|
+
def handle_progress(self, value: float) -> None:
|
|
187
|
+
self.progressBarSet(value)
|
|
188
|
+
|
|
189
|
+
def handle_result(self):
|
|
190
|
+
try:
|
|
191
|
+
self.Outputs.data.send(self.data_to_send)
|
|
192
|
+
except Exception as e:
|
|
193
|
+
print("An error occurred when sending out_data:", e)
|
|
194
|
+
self.Outputs.data.send(None)
|
|
195
|
+
return
|
|
196
|
+
|
|
197
|
+
def handle_finish(self):
|
|
198
|
+
self.progressBarFinished()
|
|
199
|
+
|
|
200
|
+
def post_initialized(self):
|
|
201
|
+
pass
|
|
202
|
+
|
|
203
|
+
if __name__ == "__main__":
|
|
204
|
+
app = QApplication(sys.argv)
|
|
205
|
+
w = OWInboxMailMonitoring()
|
|
206
|
+
w.show()
|
|
207
|
+
if hasattr(app, "exec"):
|
|
208
|
+
app.exec()
|
|
209
|
+
else:
|
|
210
|
+
app.exec_()
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
|
|
@@ -29,8 +29,8 @@ class OWMarkdownLoader(widget.OWWidget):
|
|
|
29
29
|
data = Input("Data", Table)
|
|
30
30
|
|
|
31
31
|
class Outputs:
|
|
32
|
-
md_files = Output("Markdown Files", Table)
|
|
33
|
-
data = Output("Data", Table)
|
|
32
|
+
md_files = Output("Markdown Files", Table) # -> (file_path, content)
|
|
33
|
+
data = Output("Data", Table) # passthrough de l'entrée
|
|
34
34
|
|
|
35
35
|
def __init__(self):
|
|
36
36
|
super().__init__()
|
|
@@ -30,12 +30,10 @@ from docling_core.types.doc import ImageRefMode
|
|
|
30
30
|
# ---- fix torch (Orange contrib)
|
|
31
31
|
if "site-packages/Orange/widgets" in os.path.dirname(os.path.abspath(__file__)).replace("\\", "/"):
|
|
32
32
|
from Orange.widgets.orangecontrib.AAIT.fix_torch import fix_torch_dll_error
|
|
33
|
-
from Orange.widgets.orangecontrib.AAIT.utils.import_uic import uic
|
|
34
|
-
from Orange.widgets.orangecontrib.AAIT.utils.initialize_from_ini import apply_modification_from_python_file
|
|
33
|
+
from Orange.widgets.orangecontrib.AAIT.utils.import_uic import uic
|
|
35
34
|
else:
|
|
36
35
|
from orangecontrib.AAIT.fix_torch import fix_torch_dll_error
|
|
37
|
-
from orangecontrib.AAIT.utils.import_uic import uic
|
|
38
|
-
from orangecontrib.AAIT.utils.initialize_from_ini import apply_modification_from_python_file
|
|
36
|
+
from orangecontrib.AAIT.utils.import_uic import uic
|
|
39
37
|
|
|
40
38
|
fix_torch_dll_error.fix_error_torch()
|
|
41
39
|
|
|
@@ -2,13 +2,15 @@ import os
|
|
|
2
2
|
import sys
|
|
3
3
|
from pathlib import Path
|
|
4
4
|
import shutil
|
|
5
|
-
import numpy as np
|
|
6
5
|
|
|
7
6
|
from AnyQt.QtWidgets import QApplication
|
|
8
7
|
from Orange.widgets import widget
|
|
9
8
|
from Orange.widgets.utils.signals import Input, Output
|
|
10
9
|
from Orange.data import Domain, StringVariable, Table, DiscreteVariable
|
|
11
10
|
|
|
11
|
+
# --- Ajout pour l'écriture Excel ---
|
|
12
|
+
from openpyxl import Workbook
|
|
13
|
+
|
|
12
14
|
if "site-packages/Orange/widgets" in os.path.dirname(os.path.abspath(__file__)).replace("\\", "/"):
|
|
13
15
|
from Orange.widgets.orangecontrib.IO4IT.utils import utils_md
|
|
14
16
|
from Orange.widgets.orangecontrib.AAIT.utils.import_uic import uic
|
|
@@ -20,7 +22,7 @@ else:
|
|
|
20
22
|
class OWOfficeNormalizer(widget.OWWidget):
|
|
21
23
|
name = "Office Normalizer"
|
|
22
24
|
description = "Convertit .doc→.docx et .ppt→.pptx via COM (Windows + Office)"
|
|
23
|
-
category = "
|
|
25
|
+
category = "IO4IT"
|
|
24
26
|
icon = "icons/office_normalizer.png"
|
|
25
27
|
if "site-packages/Orange/widgets" in os.path.dirname(os.path.abspath(__file__)).replace("\\", "/"):
|
|
26
28
|
icon = "icons_dev/office_normalizer.png"
|
|
@@ -44,7 +46,7 @@ class OWOfficeNormalizer(widget.OWWidget):
|
|
|
44
46
|
self.data = None
|
|
45
47
|
self.autorun = True
|
|
46
48
|
self.result = None
|
|
47
|
-
self.processed_statuses = []
|
|
49
|
+
self.processed_statuses = []
|
|
48
50
|
self.post_initialized()
|
|
49
51
|
|
|
50
52
|
@Inputs.data
|
|
@@ -67,7 +69,7 @@ class OWOfficeNormalizer(widget.OWWidget):
|
|
|
67
69
|
return
|
|
68
70
|
|
|
69
71
|
self.progressBarInit()
|
|
70
|
-
self.processed_statuses = []
|
|
72
|
+
self.processed_statuses = []
|
|
71
73
|
self.Outputs.status_data.send(None)
|
|
72
74
|
|
|
73
75
|
# Process files directly without a separate thread
|
|
@@ -91,6 +93,21 @@ class OWOfficeNormalizer(widget.OWWidget):
|
|
|
91
93
|
output_base_dir = common_path / "office_normalisation"
|
|
92
94
|
output_base_dir.mkdir(parents=True, exist_ok=True)
|
|
93
95
|
|
|
96
|
+
# Gère le nom du fichier Excel avec incrémentation
|
|
97
|
+
base_name = "normalization_results"
|
|
98
|
+
excel_path = output_base_dir / f"{base_name}.xlsx"
|
|
99
|
+
counter = 1
|
|
100
|
+
while excel_path.exists():
|
|
101
|
+
excel_path = output_base_dir / f"{base_name}_{counter}.xlsx"
|
|
102
|
+
counter += 1
|
|
103
|
+
|
|
104
|
+
# Initialise le classeur Excel
|
|
105
|
+
wb = Workbook()
|
|
106
|
+
ws = wb.active
|
|
107
|
+
ws.title = "Normalization Results"
|
|
108
|
+
headers = ["src_path", "dst_path", "status", "details"]
|
|
109
|
+
ws.append(headers)
|
|
110
|
+
|
|
94
111
|
for i, path_str in enumerate(file_paths):
|
|
95
112
|
self.progressBarSet(i / total_files * 100)
|
|
96
113
|
|
|
@@ -136,7 +153,12 @@ class OWOfficeNormalizer(widget.OWWidget):
|
|
|
136
153
|
details = f"error: {error_msg}"
|
|
137
154
|
status_text = f"ko: {details}"
|
|
138
155
|
|
|
139
|
-
#
|
|
156
|
+
# Ajoute la ligne de résultat à la table Excel et la sauvegarde
|
|
157
|
+
result_row = [path_str, dst_path, status_short, details]
|
|
158
|
+
ws.append(result_row)
|
|
159
|
+
wb.save(excel_path)
|
|
160
|
+
|
|
161
|
+
# Append to the final results list for Orange table
|
|
140
162
|
rows.append([path_str, dst_path, status_text])
|
|
141
163
|
|
|
142
164
|
# Append to the status update list and send the incremental table
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import os
|
|
2
2
|
import sys
|
|
3
3
|
from pathlib import Path
|
|
4
|
-
import numpy as np
|
|
5
4
|
|
|
6
5
|
from AnyQt.QtWidgets import QApplication
|
|
7
6
|
from AnyQt.QtCore import pyqtSignal
|
|
@@ -9,6 +8,9 @@ from Orange.data import Domain, StringVariable, Table, DiscreteVariable
|
|
|
9
8
|
from Orange.widgets import widget
|
|
10
9
|
from Orange.widgets.utils.signals import Input, Output
|
|
11
10
|
|
|
11
|
+
# --- Ajout pour l'écriture Excel ---
|
|
12
|
+
from openpyxl import Workbook
|
|
13
|
+
|
|
12
14
|
# Les imports sont adaptés pour correspondre au style de l'autre script
|
|
13
15
|
if "site-packages/Orange/widgets" in os.path.dirname(os.path.abspath(__file__)).replace("\\", "/"):
|
|
14
16
|
from Orange.widgets.orangecontrib.IO4IT.utils import utils_md
|
|
@@ -23,7 +25,7 @@ else:
|
|
|
23
25
|
class OWPdfType(widget.OWWidget):
|
|
24
26
|
name = "PDF Type"
|
|
25
27
|
description = "Checks if a PDF is text-based or image-based"
|
|
26
|
-
category = "
|
|
28
|
+
category = "IO4IT"
|
|
27
29
|
icon = "icons/check_pdf.png"
|
|
28
30
|
if "site-packages/Orange/widgets" in os.path.dirname(os.path.abspath(__file__)).replace("\\", "/"):
|
|
29
31
|
icon = "icons_dev/check_pdf.png"
|
|
@@ -99,7 +101,32 @@ class OWPdfType(widget.OWWidget):
|
|
|
99
101
|
|
|
100
102
|
def _process_pdfs(self, in_data: Table, progress_callback: callable, status_callback: callable) -> tuple[
|
|
101
103
|
Table | None, Table | None]:
|
|
104
|
+
|
|
105
|
+
# Extraction des chemins de fichiers avant de commencer le traitement
|
|
102
106
|
paths = [str(x) for x in in_data.get_column("file_path")]
|
|
107
|
+
|
|
108
|
+
# --- Gérer le nom du fichier Excel avec incrémentation ---
|
|
109
|
+
excel_output_dir = Path.cwd() / "pdf_check_results"
|
|
110
|
+
if paths:
|
|
111
|
+
first_file_path = Path(paths[0])
|
|
112
|
+
excel_output_dir = first_file_path.parent / "pdf_check_results"
|
|
113
|
+
|
|
114
|
+
excel_output_dir.mkdir(parents=True, exist_ok=True)
|
|
115
|
+
|
|
116
|
+
base_name = "pdf_check_results"
|
|
117
|
+
excel_path = excel_output_dir / f"{base_name}.xlsx"
|
|
118
|
+
counter = 1
|
|
119
|
+
while excel_path.exists():
|
|
120
|
+
excel_path = excel_output_dir / f"{base_name}_{counter}.xlsx"
|
|
121
|
+
counter += 1
|
|
122
|
+
|
|
123
|
+
# --- Initialiser le classeur Excel ---
|
|
124
|
+
wb = Workbook()
|
|
125
|
+
ws = wb.active
|
|
126
|
+
ws.title = "PDF Check Results"
|
|
127
|
+
headers = ["file_path", "status", "details"]
|
|
128
|
+
ws.append(headers)
|
|
129
|
+
|
|
103
130
|
text_indices = []
|
|
104
131
|
image_indices = []
|
|
105
132
|
|
|
@@ -108,21 +135,36 @@ class OWPdfType(widget.OWWidget):
|
|
|
108
135
|
progress_callback(i / total_files * 100)
|
|
109
136
|
|
|
110
137
|
fp = Path(p)
|
|
138
|
+
result_row = [p, "", ""] # Initialisation de la ligne de résultat
|
|
111
139
|
|
|
112
140
|
if not fp.exists() or fp.suffix.lower() != ".pdf":
|
|
113
|
-
|
|
141
|
+
result_row[1] = "ko"
|
|
142
|
+
result_row[2] = "Invalid file or not a PDF"
|
|
143
|
+
status_callback(result_row)
|
|
144
|
+
ws.append(result_row)
|
|
145
|
+
wb.save(excel_path)
|
|
114
146
|
continue
|
|
115
147
|
|
|
116
148
|
try:
|
|
117
149
|
is_text = utils_md.is_pdf_text_based(fp)
|
|
118
150
|
if is_text:
|
|
119
151
|
text_indices.append(i)
|
|
120
|
-
|
|
152
|
+
result_row[1] = "ok"
|
|
153
|
+
result_row[2] = "Text-based PDF"
|
|
121
154
|
else:
|
|
122
155
|
image_indices.append(i)
|
|
123
|
-
|
|
156
|
+
result_row[1] = "ok"
|
|
157
|
+
result_row[2] = "Image-based PDF"
|
|
158
|
+
|
|
159
|
+
status_callback(result_row)
|
|
160
|
+
ws.append(result_row)
|
|
161
|
+
wb.save(excel_path)
|
|
124
162
|
except Exception as e:
|
|
125
|
-
|
|
163
|
+
result_row[1] = "ko"
|
|
164
|
+
result_row[2] = f"Error: {str(e)}"
|
|
165
|
+
status_callback(result_row)
|
|
166
|
+
ws.append(result_row)
|
|
167
|
+
wb.save(excel_path)
|
|
126
168
|
|
|
127
169
|
progress_callback(100)
|
|
128
170
|
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import os
|
|
2
2
|
import sys
|
|
3
|
-
from AnyQt.QtWidgets import
|
|
3
|
+
from AnyQt.QtWidgets import QSpinBox, QLabel, QPushButton, QGroupBox
|
|
4
4
|
from Orange.widgets import widget
|
|
5
5
|
from Orange.widgets.utils.signals import Output
|
|
6
|
-
from AnyQt.QtWidgets import QVBoxLayout
|
|
7
6
|
|
|
8
7
|
if "site-packages/Orange/widgets" in os.path.dirname(os.path.abspath(__file__)).replace("\\", "/"):
|
|
9
8
|
from Orange.widgets.orangecontrib.IO4IT.utils import pool_exec_utils
|
|
@@ -16,7 +15,7 @@ else:
|
|
|
16
15
|
class OWProcessPoolExecutor(widget.OWWidget):
|
|
17
16
|
name = "Process Pool Executor"
|
|
18
17
|
description = "Create and configure a Process Pool Executor"
|
|
19
|
-
category = "
|
|
18
|
+
category = "IO4IT"
|
|
20
19
|
icon = "icons/process_pool_executor.png"
|
|
21
20
|
if "site-packages/Orange/widgets" in os.path.dirname(os.path.abspath(__file__)).replace("\\", "/"):
|
|
22
21
|
icon = "icons_dev/process_pool_executor.png"
|
|
@@ -15,7 +15,6 @@ class OWS3FileDownloader(OWWidget):
|
|
|
15
15
|
icon = "icons_dev/upload.png"
|
|
16
16
|
priority = 20
|
|
17
17
|
category = "AAIT - API"
|
|
18
|
-
|
|
19
18
|
# Paramètres utilisateur
|
|
20
19
|
access_key = Setting("")
|
|
21
20
|
secret_key = Setting("")
|
|
@@ -92,13 +91,13 @@ class OWS3FileDownloader(OWWidget):
|
|
|
92
91
|
s3 = session.client("s3")
|
|
93
92
|
files = os.listdir(self.download_path) # Liste tout (fichiers + dossiers)
|
|
94
93
|
files_only = [f for f in files if os.path.isfile(os.path.join(self.download_path, f))]
|
|
95
|
-
|
|
96
|
-
|
|
94
|
+
print("files_only ::: ", files_only)
|
|
95
|
+
#for file in files_only:
|
|
96
|
+
# s3.upload_file(self.download_path + "/" + file, self.bucket_name, file)
|
|
97
97
|
self.information("Upload terminé !")
|
|
98
98
|
self.Outputs.data.send(self.data)
|
|
99
99
|
|
|
100
100
|
|
|
101
|
-
|
|
102
101
|
except Exception as e:
|
|
103
102
|
print(e)
|
|
104
103
|
self.error(str(e))
|