edof 4.2.3__tar.gz → 4.2.4__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.
- {edof-4.2.3 → edof-4.2.4}/PKG-INFO +1 -1
- {edof-4.2.3 → edof-4.2.4}/edof/_apps/assets/__init__.py +18 -0
- {edof-4.2.3 → edof-4.2.4}/edof/_apps/editor.py +14 -0
- {edof-4.2.3 → edof-4.2.4}/edof/_apps/file_assoc.py +34 -19
- {edof-4.2.3 → edof-4.2.4}/edof/_apps/viewer.py +14 -0
- {edof-4.2.3 → edof-4.2.4}/edof/version.py +1 -1
- {edof-4.2.3 → edof-4.2.4}/edof.egg-info/PKG-INFO +1 -1
- {edof-4.2.3 → edof-4.2.4}/edof.egg-info/entry_points.txt +2 -0
- {edof-4.2.3 → edof-4.2.4}/pyproject.toml +4 -2
- {edof-4.2.3 → edof-4.2.4}/LICENSE +0 -0
- {edof-4.2.3 → edof-4.2.4}/README.md +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/__init__.py +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/_apps/__init__.py +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/_apps/_assoc_dialog.py +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/_apps/assets/icons/__init__.py +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/_apps/assets/icons/edof-document-512.png +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/_apps/assets/icons/edof-document.icns +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/_apps/assets/icons/edof-document.ico +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/_apps/assets/icons/edof-document.png +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/_apps/assets/icons/edof-editor-512.png +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/_apps/assets/icons/edof-editor.icns +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/_apps/assets/icons/edof-editor.ico +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/_apps/assets/icons/edof-editor.png +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/_apps/assets/icons/edof-viewer-512.png +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/_apps/assets/icons/edof-viewer.icns +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/_apps/assets/icons/edof-viewer.ico +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/_apps/assets/icons/edof-viewer.png +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/_apps/cli.py +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/_apps/edof_text_editor.py +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/_apps/shortcuts.py +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/api/__init__.py +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/api/commands.py +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/crypto/__init__.py +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/crypto/document_protection.py +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/crypto/encryption.py +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/crypto/permissions.py +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/editor_lang/en.json +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/engine/__init__.py +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/engine/color.py +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/engine/debug_log.py +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/engine/document_flow.py +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/engine/document_paginate.py +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/engine/renderer.py +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/engine/text_engine.py +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/engine/text_layout.py +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/engine/textbox_flow.py +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/engine/transform.py +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/exceptions.py +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/export/__init__.py +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/export/bitmap.py +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/export/legacy_v3.py +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/export/pdf.py +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/export/pdf_writer.py +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/export/printer.py +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/export/svg.py +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/format/__init__.py +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/format/document.py +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/format/document_body.py +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/format/document_boxes.py +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/format/objects.py +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/format/serializer.py +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/format/styles.py +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/format/svg_io.py +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/format/variables.py +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/gui/__init__.py +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/gui/pyqt6_widget.py +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/gui/tkinter_canvas.py +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/interop/__init__.py +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/interop/docx_io.py +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/py.typed +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/units.py +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/utils/__init__.py +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/utils/compat.py +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/utils/legacy_v2.py +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/utils/pdf_import.py +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/utils/qr.py +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/utils/rtf.py +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof/utils/safe_eval.py +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof.egg-info/SOURCES.txt +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof.egg-info/dependency_links.txt +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof.egg-info/requires.txt +0 -0
- {edof-4.2.3 → edof-4.2.4}/edof.egg-info/top_level.txt +0 -0
- {edof-4.2.3 → edof-4.2.4}/setup.cfg +0 -0
- {edof-4.2.3 → edof-4.2.4}/tests/test_v310.py +0 -0
- {edof-4.2.3 → edof-4.2.4}/tests/test_v400.py +0 -0
- {edof-4.2.3 → edof-4.2.4}/tests/test_v401.py +0 -0
- {edof-4.2.3 → edof-4.2.4}/tests/test_v402.py +0 -0
- {edof-4.2.3 → edof-4.2.4}/tests/test_v403.py +0 -0
- {edof-4.2.3 → edof-4.2.4}/tests/test_v410.py +0 -0
|
@@ -32,3 +32,21 @@ def app_icon_name(kind: str, ext: str = "ico") -> str:
|
|
|
32
32
|
"""Map a logical kind to an icon file name. kind in {editor,viewer,document}."""
|
|
33
33
|
kind = kind if kind in ("editor", "viewer", "document") else "document"
|
|
34
34
|
return f"edof-{kind}.{ext}"
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def set_windows_app_id(app_id: str) -> None:
|
|
38
|
+
"""Give this process its own Windows taskbar identity.
|
|
39
|
+
|
|
40
|
+
Without this, a GUI launched under python/pythonw is grouped under the host
|
|
41
|
+
interpreter and the taskbar shows the interpreter's icon instead of the
|
|
42
|
+
app's window icon. Must be called early, before any window is shown. No-op
|
|
43
|
+
off Windows.
|
|
44
|
+
"""
|
|
45
|
+
import sys
|
|
46
|
+
if sys.platform != "win32":
|
|
47
|
+
return
|
|
48
|
+
try:
|
|
49
|
+
import ctypes
|
|
50
|
+
ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(str(app_id))
|
|
51
|
+
except Exception:
|
|
52
|
+
pass
|
|
@@ -12280,6 +12280,13 @@ def _tpl_invoice():
|
|
|
12280
12280
|
|
|
12281
12281
|
|
|
12282
12282
|
def main():
|
|
12283
|
+
# v4.2.4: own taskbar identity so Windows shows the EDOF icon, not Python's.
|
|
12284
|
+
try:
|
|
12285
|
+
from edof._apps.assets import set_windows_app_id
|
|
12286
|
+
set_windows_app_id("DavidSchobl.EDOF.Editor")
|
|
12287
|
+
except Exception:
|
|
12288
|
+
pass
|
|
12289
|
+
|
|
12283
12290
|
# Remove Qt image allocation limit (default 256 MB blocks large print jobs)
|
|
12284
12291
|
try:
|
|
12285
12292
|
from PyQt6.QtGui import QImageReader
|
|
@@ -12321,6 +12328,13 @@ def main():
|
|
|
12321
12328
|
|
|
12322
12329
|
app=QApplication(sys.argv); app.setApplicationName("EDOF Editor")
|
|
12323
12330
|
app.setApplicationVersion(edof.__version__)
|
|
12331
|
+
try:
|
|
12332
|
+
from edof._apps.assets import icon_path
|
|
12333
|
+
_ip = icon_path("edof-editor.ico") or icon_path("edof-editor.png")
|
|
12334
|
+
if _ip:
|
|
12335
|
+
app.setWindowIcon(QIcon(_ip))
|
|
12336
|
+
except Exception:
|
|
12337
|
+
pass
|
|
12324
12338
|
try:
|
|
12325
12339
|
win=EdofEditor(sys.argv[1] if len(sys.argv)>1 else None)
|
|
12326
12340
|
win.show()
|
|
@@ -17,31 +17,46 @@ import subprocess
|
|
|
17
17
|
from pathlib import Path
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
def
|
|
21
|
-
"""Locate
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
def _find_app_executable(cmd_name: str, module: str) -> str:
|
|
21
|
+
"""Locate a GUI launcher as an ABSOLUTE path, never a .bat/.cmd.
|
|
22
|
+
|
|
23
|
+
Order: (1) the generated exe next to the interpreter (Scripts/ for pip
|
|
24
|
+
installs), (2) PATH via shutil.which but rejecting .bat/.cmd and forced to
|
|
25
|
+
absolute, (3) fall back to running the module with the interpreter
|
|
26
|
+
(pythonw on Windows so no console appears). This avoids picking up a
|
|
27
|
+
launcher .bat from the current directory, which has no icon and breaks when
|
|
28
|
+
invoked with a relative path.
|
|
29
|
+
"""
|
|
30
|
+
exe_dir = os.path.dirname(os.path.abspath(sys.executable)) if sys.executable else ""
|
|
31
|
+
names = [cmd_name + ".exe", cmd_name] if os.name == "nt" else [cmd_name]
|
|
32
|
+
for d in ([os.path.join(exe_dir, "Scripts"), exe_dir] if exe_dir else []):
|
|
33
|
+
for n in names:
|
|
34
|
+
p = os.path.join(d, n)
|
|
35
|
+
if os.path.isfile(p) and not p.lower().endswith((".bat", ".cmd")):
|
|
36
|
+
return os.path.abspath(p)
|
|
37
|
+
found = shutil.which(cmd_name)
|
|
38
|
+
if found and not found.lower().endswith((".bat", ".cmd")):
|
|
39
|
+
return os.path.abspath(found)
|
|
26
40
|
if sys.executable:
|
|
27
|
-
|
|
41
|
+
py = os.path.abspath(sys.executable)
|
|
42
|
+
if os.name == "nt":
|
|
43
|
+
pyw = os.path.join(os.path.dirname(py), "pythonw.exe")
|
|
44
|
+
if os.path.isfile(pyw):
|
|
45
|
+
py = pyw
|
|
46
|
+
return f'"{py}" -m {module}'
|
|
28
47
|
raise RuntimeError(
|
|
29
|
-
"Could not locate
|
|
30
|
-
"Make sure edof[viewer] is installed: pip install 'edof[viewer]'"
|
|
48
|
+
f"Could not locate {cmd_name}. Install with: pip install 'edof[all]'"
|
|
31
49
|
)
|
|
32
50
|
|
|
33
51
|
|
|
52
|
+
def _find_viewer_executable():
|
|
53
|
+
"""Locate the edof-viewer launcher (absolute path, never a .bat)."""
|
|
54
|
+
return _find_app_executable("edof-viewer", "edof._apps.viewer")
|
|
55
|
+
|
|
56
|
+
|
|
34
57
|
def _find_editor_executable():
|
|
35
|
-
"""Locate the edof-editor
|
|
36
|
-
|
|
37
|
-
if exe:
|
|
38
|
-
return exe
|
|
39
|
-
if sys.executable:
|
|
40
|
-
return f'"{sys.executable}" -m edof._apps.editor'
|
|
41
|
-
raise RuntimeError(
|
|
42
|
-
"Could not locate edof-editor executable. "
|
|
43
|
-
"Make sure edof[editor] is installed: pip install 'edof[all]'"
|
|
44
|
-
)
|
|
58
|
+
"""Locate the edof-editor launcher (absolute path, never a .bat)."""
|
|
59
|
+
return _find_app_executable("edof-editor", "edof._apps.editor")
|
|
45
60
|
|
|
46
61
|
|
|
47
62
|
def _cmd_with_arg(exe: str) -> str:
|
|
@@ -581,9 +581,23 @@ def main():
|
|
|
581
581
|
print("Install with: pip install edof[viewer]")
|
|
582
582
|
sys.exit(1)
|
|
583
583
|
|
|
584
|
+
# v4.2.4: own taskbar identity so Windows shows the EDOF icon, not Python's.
|
|
585
|
+
try:
|
|
586
|
+
from edof._apps.assets import set_windows_app_id
|
|
587
|
+
set_windows_app_id("DavidSchobl.EDOF.Viewer")
|
|
588
|
+
except Exception:
|
|
589
|
+
pass
|
|
590
|
+
|
|
584
591
|
app = QApplication(sys.argv)
|
|
585
592
|
app.setApplicationName("EDOF Viewer")
|
|
586
593
|
app.setApplicationVersion(edof.__version__)
|
|
594
|
+
try:
|
|
595
|
+
from edof._apps.assets import icon_path
|
|
596
|
+
_ip = icon_path("edof-viewer.ico") or icon_path("edof-viewer.png")
|
|
597
|
+
if _ip:
|
|
598
|
+
app.setWindowIcon(QIcon(_ip))
|
|
599
|
+
except Exception:
|
|
600
|
+
pass
|
|
587
601
|
|
|
588
602
|
# Optional file argument
|
|
589
603
|
filepath = None
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "edof"
|
|
7
|
-
version = "4.2.
|
|
7
|
+
version = "4.2.4"
|
|
8
8
|
description = "Easy Document Format – programmatic document creation, editing and export with vector PDF, rich text, tables and PDF import"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = { file = "LICENSE" }
|
|
@@ -89,6 +89,8 @@ addopts = "-v --tb=short"
|
|
|
89
89
|
source = ["edof"]
|
|
90
90
|
|
|
91
91
|
[project.scripts]
|
|
92
|
+
edof-cli = "edof._apps.cli:main"
|
|
93
|
+
|
|
94
|
+
[project.gui-scripts]
|
|
92
95
|
edof-editor = "edof._apps.editor:main"
|
|
93
96
|
edof-viewer = "edof._apps.viewer:main"
|
|
94
|
-
edof-cli = "edof._apps.cli:main"
|
|
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
|
|
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
|
|
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
|