io4it 0.0.0.12.9__tar.gz → 0.0.0.13__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.
Files changed (37) hide show
  1. io4it-0.0.0.13/PKG-INFO +21 -0
  2. io4it-0.0.0.13/io4it.egg-info/PKG-INFO +21 -0
  3. {io4it-0.0.0.12.9 → io4it-0.0.0.13}/io4it.egg-info/SOURCES.txt +0 -1
  4. {io4it-0.0.0.12.9 → io4it-0.0.0.13}/io4it.egg-info/requires.txt +2 -4
  5. {io4it-0.0.0.12.9 → io4it-0.0.0.13}/orangecontrib/IO4IT/ocr_function/word_converter.py +8 -1
  6. io4it-0.0.0.13/setup.py +110 -0
  7. io4it-0.0.0.12.9/License.txt +0 -6
  8. io4it-0.0.0.12.9/PKG-INFO +0 -9
  9. io4it-0.0.0.12.9/io4it.egg-info/PKG-INFO +0 -9
  10. io4it-0.0.0.12.9/setup.py +0 -174
  11. {io4it-0.0.0.12.9 → io4it-0.0.0.13}/io4it.egg-info/dependency_links.txt +0 -0
  12. {io4it-0.0.0.12.9 → io4it-0.0.0.13}/io4it.egg-info/entry_points.txt +0 -0
  13. {io4it-0.0.0.12.9 → io4it-0.0.0.13}/io4it.egg-info/namespace_packages.txt +0 -0
  14. {io4it-0.0.0.12.9 → io4it-0.0.0.13}/io4it.egg-info/top_level.txt +0 -0
  15. {io4it-0.0.0.12.9 → io4it-0.0.0.13}/orangecontrib/IO4IT/__init__.py +0 -0
  16. {io4it-0.0.0.12.9 → io4it-0.0.0.13}/orangecontrib/IO4IT/ocr_function/__init__.py +0 -0
  17. {io4it-0.0.0.12.9 → io4it-0.0.0.13}/orangecontrib/IO4IT/widgets/OWMarkdownizer.py +0 -0
  18. {io4it-0.0.0.12.9 → io4it-0.0.0.13}/orangecontrib/IO4IT/widgets/OWPathPropagator.py +0 -0
  19. {io4it-0.0.0.12.9 → io4it-0.0.0.13}/orangecontrib/IO4IT/widgets/OWS3Uploader.py +0 -0
  20. {io4it-0.0.0.12.9 → io4it-0.0.0.13}/orangecontrib/IO4IT/widgets/OWS3downloader.py +0 -0
  21. {io4it-0.0.0.12.9 → io4it-0.0.0.13}/orangecontrib/IO4IT/widgets/OWS3list.py +0 -0
  22. {io4it-0.0.0.12.9 → io4it-0.0.0.13}/orangecontrib/IO4IT/widgets/OWSpeechToText.py +0 -0
  23. {io4it-0.0.0.12.9 → io4it-0.0.0.13}/orangecontrib/IO4IT/widgets/OWwordpdf2docx.py +0 -0
  24. {io4it-0.0.0.12.9 → io4it-0.0.0.13}/orangecontrib/IO4IT/widgets/__init__.py +0 -0
  25. {io4it-0.0.0.12.9 → io4it-0.0.0.13}/orangecontrib/IO4IT/widgets/designer/ow_in_or_out_path.ui +0 -0
  26. {io4it-0.0.0.12.9 → io4it-0.0.0.13}/orangecontrib/IO4IT/widgets/designer/owspeechtotext.ui +0 -0
  27. {io4it-0.0.0.12.9 → io4it-0.0.0.13}/orangecontrib/IO4IT/widgets/designer/wordpdf2docx.ui +0 -0
  28. {io4it-0.0.0.12.9 → io4it-0.0.0.13}/orangecontrib/IO4IT/widgets/icons/category.svg +0 -0
  29. {io4it-0.0.0.12.9 → io4it-0.0.0.13}/orangecontrib/IO4IT/widgets/icons/download.png +0 -0
  30. {io4it-0.0.0.12.9 → io4it-0.0.0.13}/orangecontrib/IO4IT/widgets/icons/in_or_out.png +0 -0
  31. {io4it-0.0.0.12.9 → io4it-0.0.0.13}/orangecontrib/IO4IT/widgets/icons/list_aws.png +0 -0
  32. {io4it-0.0.0.12.9 → io4it-0.0.0.13}/orangecontrib/IO4IT/widgets/icons/md.png +0 -0
  33. {io4it-0.0.0.12.9 → io4it-0.0.0.13}/orangecontrib/IO4IT/widgets/icons/speech_to_text.png +0 -0
  34. {io4it-0.0.0.12.9 → io4it-0.0.0.13}/orangecontrib/IO4IT/widgets/icons/upload.png +0 -0
  35. {io4it-0.0.0.12.9 → io4it-0.0.0.13}/orangecontrib/IO4IT/widgets/icons/wordpdf2docx.png +0 -0
  36. {io4it-0.0.0.12.9 → io4it-0.0.0.13}/orangecontrib/__init__.py +0 -0
  37. {io4it-0.0.0.12.9 → io4it-0.0.0.13}/setup.cfg +0 -0
@@ -0,0 +1,21 @@
1
+ Metadata-Version: 2.1
2
+ Name: io4it
3
+ Version: 0.0.0.13
4
+ Home-page:
5
+ Author:
6
+ Author-email:
7
+ Keywords: orange3 add-on
8
+ Requires-Dist: boto3
9
+ Requires-Dist: docling
10
+ Requires-Dist: docling-core
11
+ Requires-Dist: speechbrain
12
+ Requires-Dist: whisper
13
+ Requires-Dist: whisper-openai
14
+ Requires-Dist: pyannote.audio
15
+ Requires-Dist: pyannote.core
16
+ Requires-Dist: wave
17
+ Requires-Dist: scikit-learn
18
+ Provides-Extra: cuda
19
+ Requires-Dist: torch==2.6.0+cu126; extra == "cuda"
20
+ Requires-Dist: torchvision==0.17.2+cu126; extra == "cuda"
21
+ Requires-Dist: torchaudio==2.6.0+cu126; extra == "cuda"
@@ -0,0 +1,21 @@
1
+ Metadata-Version: 2.1
2
+ Name: io4it
3
+ Version: 0.0.0.13
4
+ Home-page:
5
+ Author:
6
+ Author-email:
7
+ Keywords: orange3 add-on
8
+ Requires-Dist: boto3
9
+ Requires-Dist: docling
10
+ Requires-Dist: docling-core
11
+ Requires-Dist: speechbrain
12
+ Requires-Dist: whisper
13
+ Requires-Dist: whisper-openai
14
+ Requires-Dist: pyannote.audio
15
+ Requires-Dist: pyannote.core
16
+ Requires-Dist: wave
17
+ Requires-Dist: scikit-learn
18
+ Provides-Extra: cuda
19
+ Requires-Dist: torch==2.6.0+cu126; extra == "cuda"
20
+ Requires-Dist: torchvision==0.17.2+cu126; extra == "cuda"
21
+ Requires-Dist: torchaudio==2.6.0+cu126; extra == "cuda"
@@ -1,4 +1,3 @@
1
- License.txt
2
1
  setup.cfg
3
2
  setup.py
4
3
  io4it.egg-info/PKG-INFO
@@ -10,8 +10,6 @@ wave
10
10
  scikit-learn
11
11
 
12
12
  [cuda]
13
-
14
- [cuda:sys_platform == "win32"]
15
- torch==2.6+cu126
13
+ torch==2.6.0+cu126
16
14
  torchvision==0.17.2+cu126
17
- torchaudio==2.6+cu126
15
+ torchaudio==2.6.0+cu126
@@ -49,6 +49,7 @@ def convert_pdf_structure(input_dir: str, output_dir: str,ignore_exsting_out_put
49
49
  return f"Error: The input directory '{input_dir}' does not exist or is not a directory. "
50
50
 
51
51
  for pdf_file in input_path.rglob("*.pdf"): # Recursively search for .pdf and .PDF files
52
+ print("traitement de ",str(pdf_file))
52
53
  relative_path = pdf_file.relative_to(input_path) # Get relative path from input root
53
54
  new_file_path = output_path / relative_path.with_suffix(".docx") # Change extension to .docx
54
55
 
@@ -56,7 +57,7 @@ def convert_pdf_structure(input_dir: str, output_dir: str,ignore_exsting_out_put
56
57
 
57
58
  if ignore_exsting_out_put:
58
59
  if os.path.exists(enable_long_path(str(new_file_path))):
59
- print("ignoring",pdf_file)
60
+ print("ignoring",enable_long_path(str(new_file_path)))
60
61
  continue
61
62
 
62
63
 
@@ -185,6 +186,7 @@ def convert_pdf_to_a4(input_pdf, output_pdf):
185
186
  try:
186
187
  # Dimensions A4 en points
187
188
  a4_width, a4_height = fitz.paper_size("a4")
189
+ a3_width, a3_height = fitz.paper_size("a3")
188
190
  doc = fitz.open(input_pdf)
189
191
  new_doc = fitz.open()
190
192
 
@@ -196,6 +198,11 @@ def convert_pdf_to_a4(input_pdf, output_pdf):
196
198
  new_doc.insert_pdf(doc, from_page=page.number, to_page=page.number)
197
199
  continue
198
200
 
201
+ # Si la page est déjà en A3 (tolérance de 1 point)
202
+ if abs(page_w - a3_width) < 1 and abs(page_h - a3_height) < 1:
203
+ new_doc.insert_pdf(doc, from_page=page.number, to_page=page.number)
204
+ continue
205
+
199
206
  # Définition de la transformation selon l'orientation de la page
200
207
  if page_w > page_h: # Paysage
201
208
  # Après rotation, les dimensions seront inversées (largeur <-> hauteur)
@@ -0,0 +1,110 @@
1
+ import time
2
+ import warnings
3
+ from setuptools import setup, find_packages
4
+ import sys
5
+ import subprocess
6
+ import platform
7
+ from setuptools.command.install import install
8
+
9
+ def log_message(message, level="INFO"):
10
+ timestamp = time.strftime("%H:%M:%S")
11
+ border = "=" * (len(message) + 4)
12
+ print(f"\n{border}")
13
+ print(f"{timestamp} - {level} - {message}")
14
+ print(f"{border}\n")
15
+
16
+ class CustomInstall(install):
17
+ def run(self):
18
+ log_message(f"Début de l'installation de {NAME} v{VERSION}")
19
+ log_message("Étape 1/2 : Installation des dépendances principales")
20
+ install.run(self)
21
+
22
+ if 'cuda' in sys.argv:
23
+ log_message("Option [cuda] détectée", "IMPORTANT")
24
+ log_message("⚠️ Assurez-vous d’utiliser --extra-index-url https://download.pytorch.org/whl/cu126", "NOTE")
25
+ else:
26
+ log_message("Mode CPU sélectionné", "NOTE")
27
+ self._warn_cuda_option()
28
+
29
+ def _warn_cuda_option(self):
30
+ if platform.system() == "Windows":
31
+ log_message("ASTUCE: Pour activer CUDA sous Windows", "NOTE")
32
+ print("\033[94m" + "="*80)
33
+ print("Pour une version avec accélération GPU, utilisez :")
34
+ print("pip install io4it[cuda] --extra-index-url https://download.pytorch.org/whl/cu126")
35
+ print("="*80 + "\033[0m\n")
36
+
37
+ # Configuration
38
+ NAME = "io4it"
39
+ VERSION = "0.0.0.13"
40
+
41
+ INSTALL_REQUIRES = [
42
+ "boto3",
43
+ "docling",
44
+ "docling-core",
45
+ "speechbrain",
46
+ "whisper",
47
+ "whisper-openai",
48
+ "pyannote.audio",
49
+ "pyannote.core",
50
+ "wave",
51
+ "scikit-learn",
52
+ ]
53
+
54
+ AUTHOR = ""
55
+ AUTHOR_EMAIL = ""
56
+ URL = ""
57
+ DESCRIPTION = ""
58
+ LICENSE = ""
59
+ KEYWORDS = ["orange3 add-on",]
60
+
61
+ PACKAGES = find_packages()
62
+ PACKAGES = [pack for pack in PACKAGES if "orangecontrib" in pack and "IO4IT" in pack]
63
+ PACKAGES.append("orangecontrib")
64
+ print("####", PACKAGES)
65
+
66
+ PACKAGE_DATA = {
67
+ "orangecontrib.IO4IT.widgets": ["icons/*", "designer/*"],
68
+ }
69
+
70
+ EXTRAS_REQUIRE = {
71
+ 'cuda': [
72
+ 'torch==2.6.0+cu126',
73
+ 'torchvision==0.17.2+cu126',
74
+ 'torchaudio==2.6.0+cu126'
75
+ ]
76
+ }
77
+
78
+ ENTRY_POINTS = {
79
+ "orange.widgets": (
80
+ "Advanced Artificial Intelligence Tools = orangecontrib.IO4IT.widgets",
81
+ )
82
+ }
83
+
84
+ NAMESPACE_PACKAGES = ["orangecontrib"]
85
+
86
+ if platform.system() == "Windows":
87
+ warnings.warn(
88
+ "Vous êtes sur Windows. Si vous avez une carte NVIDIA CUDA, installez avec :\n"
89
+ " pip install io4it[cuda] --extra-index-url https://download.pytorch.org/whl/cu126",
90
+ UserWarning
91
+ )
92
+
93
+ setup(
94
+ name=NAME,
95
+ version=VERSION,
96
+ author=AUTHOR,
97
+ author_email=AUTHOR_EMAIL,
98
+ url=URL,
99
+ license=LICENSE,
100
+ keywords=KEYWORDS,
101
+ packages=PACKAGES,
102
+ package_data=PACKAGE_DATA,
103
+ install_requires=INSTALL_REQUIRES,
104
+ extras_require=EXTRAS_REQUIRE,
105
+ entry_points=ENTRY_POINTS,
106
+ namespace_packages=NAMESPACE_PACKAGES,
107
+ cmdclass={
108
+ 'install': CustomInstall,
109
+ },
110
+ )
@@ -1,6 +0,0 @@
1
- THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT ANY WARRANTY WHATSOEVER.
2
-
3
- If you use or redistribute this software, you are permitted to do so
4
- under the terms of GNU [GPL-3.0]+ license.
5
-
6
- [GPL-3.0]: https://www.gnu.org/licenses/gpl-3.0.en.html
io4it-0.0.0.12.9/PKG-INFO DELETED
@@ -1,9 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: io4it
3
- Version: 0.0.0.12.9
4
- Home-page:
5
- Author:
6
- Author-email:
7
- Keywords: orange3 add-on
8
- Provides-Extra: cuda
9
- License-File: License.txt
@@ -1,9 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: io4it
3
- Version: 0.0.0.12.9
4
- Home-page:
5
- Author:
6
- Author-email:
7
- Keywords: orange3 add-on
8
- Provides-Extra: cuda
9
- License-File: License.txt
io4it-0.0.0.12.9/setup.py DELETED
@@ -1,174 +0,0 @@
1
- import time
2
- import warnings
3
- from setuptools import setup, find_packages
4
- import sys
5
- import subprocess
6
- import platform
7
- from setuptools.command.install import install
8
-
9
- def log_message(message, level="INFO"):
10
- timestamp = time.strftime("%H:%M:%S")
11
- border = "=" * (len(message) + 4)
12
- print(f"\n{border}")
13
- print(f"{timestamp} - {level} - {message}")
14
- print(f"{border}\n")
15
-
16
- class CustomInstall(install):
17
- def run(self):
18
- log_message(f"Début de l'installation de {NAME} v{VERSION}")
19
-
20
- # Installation des dépendances de base
21
- log_message("Étape 1/2 : Installation des dépendances principales")
22
- install.run(self)
23
-
24
- # Gestion CUDA si option spécifiée
25
- if 'cuda' in sys.argv:
26
- log_message("Option [cuda] détectée", "IMPORTANT")
27
- self._install_torch_cuda()
28
- else:
29
- log_message("Mode CPU sélectionné", "NOTE")
30
- self._warn_cuda_option()
31
-
32
- def _install_torch_cuda(self):
33
- try:
34
- log_message("Vérification de l'environnement CUDA...")
35
- import torch
36
- if torch.cuda.is_available():
37
- log_message(f"PyTorch CUDA déjà installé (v{torch.__version__}, CUDA v{torch.version.cuda})", "SUCCÈS")
38
- return
39
- else:
40
- log_message("PyTorch installé mais CUDA non disponible", "AVERTISSEMENT")
41
- except ImportError:
42
- log_message("PyTorch non détecté", "INFO")
43
-
44
- log_message("Tentative d'installation de PyTorch avec CUDA 12.6...", "IMPORTANT")
45
- try:
46
- cmd = [
47
- sys.executable, '-m', 'pip', 'install',
48
- 'torch==2.6+cu126',
49
- 'torchvision==0.17.2+cu126',
50
- 'torchaudio==2.6+cu126',
51
- '--index-url', 'https://download.pytorch.org/whl/cu126',
52
- '--no-deps'
53
- ]
54
- log_message(f"Commande exécutée: {' '.join(cmd)}", "DEBUG")
55
-
56
- start_time = time.time()
57
- subprocess.check_call(cmd)
58
- duration = time.time() - start_time
59
-
60
- log_message(f"PyTorch CUDA installé avec succès en {duration:.1f}s", "SUCCÈS")
61
-
62
- # Vérification finale
63
- import torch
64
- log_message(f"Version PyTorch: {torch.__version__}", "INFO")
65
- log_message(f"Version CUDA: {torch.version.cuda}", "INFO")
66
- log_message(f"Disponibilité CUDA: {torch.cuda.is_available()}", "INFO")
67
-
68
- except subprocess.CalledProcessError as e:
69
- log_message("ÉCHEC de l'installation CUDA", "ERREUR")
70
- log_message("Solution alternative:", "IMPORTANT")
71
- print("\n\033[93m" + "="*80)
72
- print("POUR INSTALLER MANUELLEMENT PYTORCH CUDA, EXÉCUTEZ:")
73
- print("pip install torch==2.2.2+cu126 torchvision==0.17.2+cu126 torchaudio==2.2.2+cu126")
74
- print("--index-url https://download.pytorch.org/whl/cu126")
75
- print("="*80 + "\033[0m\n")
76
-
77
- def _warn_cuda_option(self):
78
- if platform.system() == "Windows":
79
- log_message("ASTUCE: Pour activer CUDA sous Windows", "NOTE")
80
- print("\033[94m" + "="*80)
81
- print("Pour une version avec accélération GPU, utilisez plutôt:")
82
- print("pip install io4it[cuda] --extra-index-url https://download.pytorch.org/whl/cu126")
83
- print("="*80 + "\033[0m\n")
84
-
85
-
86
- # Configuration
87
- NAME = "io4it"
88
- VERSION = "0.0.0.12.9" # Incrémentez la version
89
-
90
- INSTALL_REQUIRES = [
91
- "boto3",
92
- "docling",
93
- "docling-core",
94
- "speechbrain",
95
- "whisper",
96
- "whisper-openai",
97
- "pyannote.audio",
98
- "pyannote.core",
99
- "wave",
100
- "scikit-learn",
101
- # Exclure torch intentionnellement
102
- ]
103
- # Facultatif / Adaptable à souhait
104
- AUTHOR = ""
105
- AUTHOR_EMAIL = ""
106
- URL = ""
107
- DESCRIPTION = ""
108
- LICENSE = ""
109
-
110
- # 'orange3 add-on' permet de rendre l'addon téléchargeable via l'interface addons d'Orange
111
- KEYWORDS = ["orange3 add-on",]
112
-
113
- # Tous les packages python existants dans le projet (avec un __ini__.py)
114
- PACKAGES = find_packages()
115
- PACKAGES = [pack for pack in PACKAGES if "orangecontrib" in pack and "IO4IT" in pack]
116
- PACKAGES.append("orangecontrib")
117
- print("####",PACKAGES)
118
-
119
-
120
-
121
- # Fichiers additionnels aux fichiers .py (comme les icons ou des .ows)
122
- PACKAGE_DATA = {
123
- "orangecontrib.IO4IT.widgets": ["icons/*", "designer/*"],
124
- }
125
- # /!\ les noms de fichier 'orangecontrib.hkh_bot.widgets' doivent correspondre à l'arborescence
126
-
127
- EXTRAS_REQUIRE = {
128
- 'cuda': [
129
- 'torch==2.6+cu126; sys_platform == "win32"',
130
- 'torchvision==0.17.2+cu126; sys_platform == "win32"',
131
- 'torchaudio==2.6+cu126; sys_platform == "win32"'
132
- ]
133
- }
134
-
135
- # Spécifie le dossier contenant les widgets et le nom de section qu'aura l'addon sur Orange
136
- ENTRY_POINTS = {
137
- "orange.widgets": (
138
- "Advanced Artificial Intelligence Tools = orangecontrib.IO4IT.widgets",
139
- )
140
- }
141
- # /!\ les noms de fichier 'orangecontrib.hkh_bot.widgets' doivent correspondre à l'arborescence
142
-
143
- NAMESPACE_PACKAGES = ["orangecontrib"]
144
-
145
-
146
-
147
- # Message informatif si on est sous Windows
148
- if platform.system() == "Windows":
149
- warnings.warn(
150
- "Vous êtes sur Windows. Si vous avez une carte NVIDIA CUDA, installez avec :\n"
151
- " pip install io4it[cuda] --extra-index-url https://download.pytorch.org/whl/cu126",
152
- UserWarning
153
- )
154
-
155
-
156
- setup(
157
- name=NAME,
158
- version=VERSION,
159
- author=AUTHOR,
160
- author_email=AUTHOR_EMAIL,
161
- url=URL,
162
- license=LICENSE,
163
- keywords=KEYWORDS,
164
- packages=PACKAGES,
165
- package_data=PACKAGE_DATA,
166
- install_requires=INSTALL_REQUIRES,
167
- entry_points=ENTRY_POINTS,
168
- namespace_packages=NAMESPACE_PACKAGES,
169
- extras_require=EXTRAS_REQUIRE,
170
- cmdclass={
171
- 'install': CustomInstall,
172
- },
173
- )
174
-
File without changes