pyxtxt 0.2.1__tar.gz → 0.2.2__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.
- {pyxtxt-0.2.1/src/pyxtxt.egg-info → pyxtxt-0.2.2}/PKG-INFO +1 -1
- {pyxtxt-0.2.1 → pyxtxt-0.2.2}/pyproject.toml +1 -1
- {pyxtxt-0.2.1 → pyxtxt-0.2.2}/src/pyxtxt/estrattori/doc.py +11 -6
- {pyxtxt-0.2.1 → pyxtxt-0.2.2/src/pyxtxt.egg-info}/PKG-INFO +1 -1
- {pyxtxt-0.2.1 → pyxtxt-0.2.2}/LICENCSE +0 -0
- {pyxtxt-0.2.1 → pyxtxt-0.2.2}/MANIFEST.in +0 -0
- {pyxtxt-0.2.1 → pyxtxt-0.2.2}/README.md +0 -0
- {pyxtxt-0.2.1 → pyxtxt-0.2.2}/examples.py +0 -0
- {pyxtxt-0.2.1 → pyxtxt-0.2.2}/setup.cfg +0 -0
- {pyxtxt-0.2.1 → pyxtxt-0.2.2}/src/pyxtxt/__init__.py +0 -0
- {pyxtxt-0.2.1 → pyxtxt-0.2.2}/src/pyxtxt/core.py +0 -0
- {pyxtxt-0.2.1 → pyxtxt-0.2.2}/src/pyxtxt/estrattori/__init__.py +0 -0
- {pyxtxt-0.2.1 → pyxtxt-0.2.2}/src/pyxtxt/estrattori/docx.py +0 -0
- {pyxtxt-0.2.1 → pyxtxt-0.2.2}/src/pyxtxt/estrattori/eml.py +0 -0
- {pyxtxt-0.2.1 → pyxtxt-0.2.2}/src/pyxtxt/estrattori/epub.py +0 -0
- {pyxtxt-0.2.1 → pyxtxt-0.2.2}/src/pyxtxt/estrattori/html.py +0 -0
- {pyxtxt-0.2.1 → pyxtxt-0.2.2}/src/pyxtxt/estrattori/md.py +0 -0
- {pyxtxt-0.2.1 → pyxtxt-0.2.2}/src/pyxtxt/estrattori/msg.py +0 -0
- {pyxtxt-0.2.1 → pyxtxt-0.2.2}/src/pyxtxt/estrattori/odt.py +0 -0
- {pyxtxt-0.2.1 → pyxtxt-0.2.2}/src/pyxtxt/estrattori/pdf.py +0 -0
- {pyxtxt-0.2.1 → pyxtxt-0.2.2}/src/pyxtxt/estrattori/pptx.py +0 -0
- {pyxtxt-0.2.1 → pyxtxt-0.2.2}/src/pyxtxt/estrattori/rtf.py +0 -0
- {pyxtxt-0.2.1 → pyxtxt-0.2.2}/src/pyxtxt/estrattori/svg.py +0 -0
- {pyxtxt-0.2.1 → pyxtxt-0.2.2}/src/pyxtxt/estrattori/tex.py +0 -0
- {pyxtxt-0.2.1 → pyxtxt-0.2.2}/src/pyxtxt/estrattori/txt.py +0 -0
- {pyxtxt-0.2.1 → pyxtxt-0.2.2}/src/pyxtxt/estrattori/xls.py +0 -0
- {pyxtxt-0.2.1 → pyxtxt-0.2.2}/src/pyxtxt/estrattori/xlsx.py +0 -0
- {pyxtxt-0.2.1 → pyxtxt-0.2.2}/src/pyxtxt/estrattori/xml.py +0 -0
- {pyxtxt-0.2.1 → pyxtxt-0.2.2}/src/pyxtxt/pyxtxt.py +0 -0
- {pyxtxt-0.2.1 → pyxtxt-0.2.2}/src/pyxtxt.egg-info/SOURCES.txt +0 -0
- {pyxtxt-0.2.1 → pyxtxt-0.2.2}/src/pyxtxt.egg-info/dependency_links.txt +0 -0
- {pyxtxt-0.2.1 → pyxtxt-0.2.2}/src/pyxtxt.egg-info/requires.txt +0 -0
- {pyxtxt-0.2.1 → pyxtxt-0.2.2}/src/pyxtxt.egg-info/top_level.txt +0 -0
|
@@ -10,15 +10,20 @@ def xtxt_doc(file_buffer):
|
|
|
10
10
|
try:
|
|
11
11
|
file_buffer.seek(0)
|
|
12
12
|
data = file_buffer.read()
|
|
13
|
-
with tempfile.NamedTemporaryFile(suffix=".doc") as temp_file:
|
|
13
|
+
with tempfile.NamedTemporaryFile(suffix=".doc", delete=False) as temp_file:
|
|
14
14
|
temp_file.write(data)
|
|
15
15
|
temp_file.flush()
|
|
16
16
|
temp_path = temp_file.name
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
|
|
18
|
+
try:
|
|
19
|
+
result = subprocess.run(["antiword", temp_path], capture_output=True, text=True)
|
|
20
|
+
if result.returncode != 0:
|
|
21
|
+
print(f"⚠️ antiword failed: {result.stderr}")
|
|
22
|
+
return None
|
|
23
|
+
return result.stdout.strip()
|
|
24
|
+
finally:
|
|
25
|
+
import os
|
|
26
|
+
os.unlink(temp_path)
|
|
22
27
|
except Exception as e:
|
|
23
28
|
print(f"⚠️ Error during extraction from DOC: {e}")
|
|
24
29
|
return None
|
|
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
|