io4it 2.1.0.5__tar.gz → 2.1.0.6__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.0.5 → io4it-2.1.0.6}/PKG-INFO +1 -1
- {io4it-2.1.0.5 → io4it-2.1.0.6}/io4it.egg-info/PKG-INFO +1 -1
- {io4it-2.1.0.5 → io4it-2.1.0.6}/io4it.egg-info/SOURCES.txt +2 -1
- {io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/widgets/OWDoclingMarkdownizerSimple.py +0 -1
- {io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/widgets/OWMarkdownLoader.py +32 -30
- {io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/widgets/OWMarkdownizer.py +2 -2
- {io4it-2.1.0.5 → io4it-2.1.0.6}/setup.py +1 -1
- {io4it-2.1.0.5 → io4it-2.1.0.6}/io4it.egg-info/dependency_links.txt +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/io4it.egg-info/entry_points.txt +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/io4it.egg-info/namespace_packages.txt +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/io4it.egg-info/requires.txt +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/io4it.egg-info/top_level.txt +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/__init__.py +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/ocr_function/__init__.py +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/ocr_function/word_converter.py +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/utils/__init__.py +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/utils/mail.py +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/utils/offuscation_basique.py +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/utils/pool_exec_utils.py +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/utils/utils_md.py +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/widgets/OWChatGpt.py +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/widgets/OWDeep_Search.py +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/widgets/OWExportMarkdown.py +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/widgets/OWOfficeNormalizer.py +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/widgets/OWPdfType.py +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/widgets/OWProcessPoolExecutor.py +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/widgets/OWS3Uploader.py +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/widgets/OWS3downloader.py +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/widgets/OWS3list.py +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/widgets/OWSpeechToText.py +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/widgets/OWmailLoader.py +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/widgets/OWmailSender.py +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/widgets/OWwordpdf2docx.py +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/widgets/__init__.py +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/widgets/designer/__init__.py +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/widgets/designer/nogui.ui +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/widgets/designer/ow_file_ext_selector.ui +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/widgets/designer/owchatgpt.ui +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/widgets/designer/owdeepsearch.ui +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/widgets/designer/owdoclingmarkdownizersimple.ui +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/widgets/designer/owexportmarkdown.ui +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/widgets/designer/owmailloader.ui +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/widgets/designer/owmailsender.ui +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/widgets/designer/owmarkdownizer.ui +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/widgets/designer/owmarkdownloader.ui +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/widgets/designer/owofficenormalizer.ui +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/widgets/designer/owpdftype.ui +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/widgets/designer/owprocesspoolexecutor.ui +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/widgets/designer/owspeechtotext.ui +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/widgets/designer/wordpdf2docx.ui +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/widgets/icons/__init__.py +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/widgets/icons/chatgpt.png +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/widgets/icons/check_pdf.png +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/widgets/icons/deepsearch.svg +0 -0
- /io4it-2.1.0.5/orangecontrib/IO4IT/widgets/icons/md_old.png → /io4it-2.1.0.6/orangecontrib/IO4IT/widgets/icons/dep_md_old.png +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/widgets/icons/download.png +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/widgets/icons/export_md.png +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/widgets/icons/file_extensor.png +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/widgets/icons/list_aws.png +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/widgets/icons/load_md.png +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/widgets/icons/mail_loader.png +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/widgets/icons/mail_writer.png +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/widgets/icons/md.png +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/widgets/icons/office_normalizer.png +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/widgets/icons/process_pool_executor.png +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/widgets/icons/speech_to_text.png +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/widgets/icons/upload.png +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/widgets/icons/visualizationer.png +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/widgets/icons/wordpdf2docx.png +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/widgets/icons_dev/__init__.py +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/__init__.py +0 -0
- {io4it-2.1.0.5 → io4it-2.1.0.6}/setup.cfg +0 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
setup.cfg
|
|
1
2
|
setup.py
|
|
2
3
|
io4it.egg-info/PKG-INFO
|
|
3
4
|
io4it.egg-info/SOURCES.txt
|
|
@@ -52,6 +53,7 @@ orangecontrib/IO4IT/widgets/icons/__init__.py
|
|
|
52
53
|
orangecontrib/IO4IT/widgets/icons/chatgpt.png
|
|
53
54
|
orangecontrib/IO4IT/widgets/icons/check_pdf.png
|
|
54
55
|
orangecontrib/IO4IT/widgets/icons/deepsearch.svg
|
|
56
|
+
orangecontrib/IO4IT/widgets/icons/dep_md_old.png
|
|
55
57
|
orangecontrib/IO4IT/widgets/icons/download.png
|
|
56
58
|
orangecontrib/IO4IT/widgets/icons/export_md.png
|
|
57
59
|
orangecontrib/IO4IT/widgets/icons/file_extensor.png
|
|
@@ -60,7 +62,6 @@ orangecontrib/IO4IT/widgets/icons/load_md.png
|
|
|
60
62
|
orangecontrib/IO4IT/widgets/icons/mail_loader.png
|
|
61
63
|
orangecontrib/IO4IT/widgets/icons/mail_writer.png
|
|
62
64
|
orangecontrib/IO4IT/widgets/icons/md.png
|
|
63
|
-
orangecontrib/IO4IT/widgets/icons/md_old.png
|
|
64
65
|
orangecontrib/IO4IT/widgets/icons/office_normalizer.png
|
|
65
66
|
orangecontrib/IO4IT/widgets/icons/process_pool_executor.png
|
|
66
67
|
orangecontrib/IO4IT/widgets/icons/speech_to_text.png
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
# ow_markdown_loader.py
|
|
2
1
|
import os
|
|
3
2
|
from pathlib import Path
|
|
4
3
|
import numpy as np
|
|
5
4
|
|
|
6
|
-
from AnyQt.QtWidgets import QLabel, QCheckBox
|
|
7
5
|
from Orange.widgets import widget
|
|
8
6
|
from Orange.widgets.utils.signals import Input, Output
|
|
9
7
|
from Orange.data import Domain, StringVariable, Table
|
|
8
|
+
from AnyQt.QtWidgets import QCheckBox
|
|
10
9
|
|
|
11
|
-
|
|
12
|
-
from Orange.widgets.orangecontrib.
|
|
13
|
-
|
|
10
|
+
try:
|
|
11
|
+
from Orange.widgets.orangecontrib.AAIT.utils.import_uic import uic
|
|
12
|
+
from range.widgets.orangecontrib.IO4IT.utils import utils_md
|
|
13
|
+
except ImportError:
|
|
14
14
|
from orangecontrib.IO4IT.utils import utils_md
|
|
15
|
+
from orangecontrib.AAIT.utils.import_uic import uic
|
|
15
16
|
|
|
16
17
|
|
|
17
18
|
class OWMarkdownLoader(widget.OWWidget):
|
|
@@ -28,28 +29,25 @@ class OWMarkdownLoader(widget.OWWidget):
|
|
|
28
29
|
data = Input("Data", Table)
|
|
29
30
|
|
|
30
31
|
class Outputs:
|
|
31
|
-
md_files = Output("Markdown Files", Table)
|
|
32
|
-
data = Output("Data", Table)
|
|
32
|
+
md_files = Output("Markdown Files", Table) # -> (file_path, content)
|
|
33
|
+
data = Output("Data", Table) # passthrough de l'entrée
|
|
33
34
|
|
|
34
35
|
def __init__(self):
|
|
35
36
|
super().__init__()
|
|
37
|
+
|
|
36
38
|
self.in_data = None
|
|
37
39
|
self.input_dir = None
|
|
38
|
-
self.
|
|
39
|
-
|
|
40
|
-
#
|
|
41
|
-
self.
|
|
42
|
-
self.
|
|
43
|
-
self.checkbox.setChecked(True)
|
|
44
|
-
self.checkbox.stateChanged.connect(self._on_recursive_toggled)
|
|
40
|
+
uic.loadUi(self.gui, self)
|
|
41
|
+
self.checkBoxRecursive = self.findChild(QCheckBox, 'checkBoxRecursive')
|
|
42
|
+
# These lines MUST be after super().__init__()
|
|
43
|
+
self.recursive = self.checkBoxRecursive.isChecked()
|
|
44
|
+
self.checkBoxRecursive.stateChanged.connect(self._on_recursive_toggled)
|
|
45
45
|
|
|
46
|
-
self.layout().addWidget(self.label)
|
|
47
|
-
self.layout().addWidget(self.checkbox)
|
|
48
46
|
self.warning("")
|
|
49
47
|
|
|
50
48
|
def _on_recursive_toggled(self, _state):
|
|
51
|
-
self.recursive = self.
|
|
52
|
-
#
|
|
49
|
+
self.recursive = self.checkBoxRecursive.isChecked()
|
|
50
|
+
# If a directory is already set, re-run the production
|
|
53
51
|
if self.input_dir:
|
|
54
52
|
self._produce()
|
|
55
53
|
|
|
@@ -58,24 +56,27 @@ class OWMarkdownLoader(widget.OWWidget):
|
|
|
58
56
|
self.in_data = in_data
|
|
59
57
|
self.warning("")
|
|
60
58
|
|
|
61
|
-
#
|
|
59
|
+
# Always pass through the input data
|
|
62
60
|
self.Outputs.data.send(in_data)
|
|
63
61
|
|
|
64
62
|
if not in_data:
|
|
65
|
-
#
|
|
63
|
+
# If no input data, send an empty table
|
|
66
64
|
self.Outputs.md_files.send(self._empty_md_table())
|
|
65
|
+
self.Description.setText(
|
|
66
|
+
"This widget loads Markdown files from a folder. The path must be in a column named 'input_dir'.")
|
|
67
67
|
return
|
|
68
68
|
|
|
69
|
-
#
|
|
69
|
+
# Look for the 'input_dir' column and get the first folder
|
|
70
70
|
try:
|
|
71
|
-
|
|
72
|
-
self.input_dir = str(in_data
|
|
73
|
-
except
|
|
74
|
-
self.warning('"input_dir" (Text)
|
|
71
|
+
input_dir_column = in_data.domain["input_dir"]
|
|
72
|
+
self.input_dir = str(in_data[0, input_dir_column].value)
|
|
73
|
+
except (KeyError, IndexError, AttributeError):
|
|
74
|
+
self.warning('"input_dir" (Text) is required in the input data.')
|
|
75
75
|
self.Outputs.md_files.send(self._empty_md_table())
|
|
76
|
+
self.Description.setText("Error: 'input_dir' (Text) column not found or is empty.")
|
|
76
77
|
return
|
|
77
78
|
|
|
78
|
-
self.
|
|
79
|
+
self.Description.setText(f"Dossier : {self.input_dir}")
|
|
79
80
|
self._produce()
|
|
80
81
|
|
|
81
82
|
def _empty_md_table(self) -> Table:
|
|
@@ -85,6 +86,10 @@ class OWMarkdownLoader(widget.OWWidget):
|
|
|
85
86
|
return Table.from_numpy(domain, X, metas=metas)
|
|
86
87
|
|
|
87
88
|
def _produce(self):
|
|
89
|
+
if not self.input_dir or not os.path.isdir(self.input_dir):
|
|
90
|
+
self.warning(f"Invalid directory path: '{self.input_dir}'")
|
|
91
|
+
self.Outputs.md_files.send(self._empty_md_table())
|
|
92
|
+
return
|
|
88
93
|
base = Path(self.input_dir)
|
|
89
94
|
patterns = ["*.md"]
|
|
90
95
|
paths = []
|
|
@@ -101,12 +106,9 @@ class OWMarkdownLoader(widget.OWWidget):
|
|
|
101
106
|
md_rows.append([str(p), utils_md.try_read_text(p)])
|
|
102
107
|
except Exception:
|
|
103
108
|
md_rows.append([str(p), ""])
|
|
104
|
-
|
|
105
|
-
# Construit la table pour "Markdown Files"
|
|
106
109
|
domain = Domain([], metas=[StringVariable("file_path"), StringVariable("content")])
|
|
107
110
|
X = np.empty((len(md_rows), 0))
|
|
108
111
|
metas = np.array(md_rows, dtype=object) if md_rows else np.empty((0, 2), dtype=object)
|
|
109
112
|
md_table = Table.from_numpy(domain, X, metas=metas)
|
|
110
113
|
|
|
111
|
-
self.Outputs.md_files.send(md_table)
|
|
112
|
-
# Le passthrough est déjà envoyé dans set_data ; on n'y retouche pas ici.
|
|
114
|
+
self.Outputs.md_files.send(md_table)
|
|
@@ -522,9 +522,9 @@ class MarkdownConversionThread(QThread):
|
|
|
522
522
|
class FileProcessorApp(widget.OWWidget):
|
|
523
523
|
name = "Markdownizer"
|
|
524
524
|
description = "Convert PDFs, DOCX, PPTX to Markdown (texte seul & word only)"
|
|
525
|
-
icon = "icons/
|
|
525
|
+
icon = "icons/dep_md_old.png"
|
|
526
526
|
if "site-packages/Orange/widgets" in os.path.dirname(os.path.abspath(__file__)).replace("\\", "/"):
|
|
527
|
-
icon = "icons_dev/
|
|
527
|
+
icon = "icons_dev/dep_md_old.png"
|
|
528
528
|
want_control_area = False
|
|
529
529
|
priority = 1001
|
|
530
530
|
gui = os.path.join(os.path.dirname(os.path.abspath(__file__)), "designer/owmarkdownizer.ui")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/widgets/designer/ow_file_ext_selector.ui
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/widgets/designer/owdoclingmarkdownizersimple.ui
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{io4it-2.1.0.5 → io4it-2.1.0.6}/orangecontrib/IO4IT/widgets/designer/owprocesspoolexecutor.ui
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|