feat: add PDF page preview and duplication GUI
Add tkinter GUI with search, page duplication, and PyInstaller Windows build tooling. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
2461a6b6fa
commit
1d627a9847
8 files changed
+825
No files matched your search
@@ -0,0 +1,78 @@
|
||||
# -*- mode: python ; coding: utf-8 -*-
|
||||
"""PyInstaller spec for PDFDupTool — build with: pyinstaller PDFDupTool.spec"""
|
||||
|
||||
import re
|
||||
from pathlib import Path
|
||||
|
||||
from PyInstaller.utils.hooks import collect_all
|
||||
|
||||
_spec_dir = Path(SPEC).resolve().parent
|
||||
_ver_m = re.search(
|
||||
r'APP_VERSION\s*=\s*["\']([^"\']+)["\']',
|
||||
(_spec_dir / "version_info.py").read_text(encoding="utf-8"),
|
||||
)
|
||||
_EXE_NAME = f"PDFDupTool-{_ver_m.group(1)}" if _ver_m else "PDFDupTool"
|
||||
|
||||
datas, binaries, hiddenimports = [], [], []
|
||||
tmp = collect_all("pymupdf")
|
||||
datas += tmp[0]
|
||||
binaries += tmp[1]
|
||||
hiddenimports += tmp[2]
|
||||
|
||||
# Prevent pulling optional heavy stacks from a developer machine into the exe.
|
||||
_EXCLUDES = [
|
||||
"torch",
|
||||
"torchvision",
|
||||
"torchaudio",
|
||||
"tensorflow",
|
||||
"tensorboard",
|
||||
"pandas",
|
||||
"scipy",
|
||||
"sklearn",
|
||||
"matplotlib",
|
||||
"numba",
|
||||
"cv2",
|
||||
"IPython",
|
||||
"jupyter",
|
||||
"notebook",
|
||||
"pytest",
|
||||
"sympy",
|
||||
"xmlrpc",
|
||||
"pydoc",
|
||||
]
|
||||
|
||||
a = Analysis(
|
||||
["pdf_dup_gui.py"],
|
||||
pathex=[],
|
||||
binaries=binaries,
|
||||
datas=datas,
|
||||
hiddenimports=hiddenimports,
|
||||
hookspath=[],
|
||||
hooksconfig={},
|
||||
runtime_hooks=[],
|
||||
excludes=_EXCLUDES,
|
||||
noarchive=False,
|
||||
optimize=0,
|
||||
)
|
||||
pyz = PYZ(a.pure)
|
||||
|
||||
exe = EXE(
|
||||
pyz,
|
||||
a.scripts,
|
||||
a.binaries,
|
||||
a.datas,
|
||||
[],
|
||||
name=_EXE_NAME,
|
||||
debug=False,
|
||||
bootloader_ignore_signals=False,
|
||||
strip=False,
|
||||
upx=True,
|
||||
upx_exclude=[],
|
||||
runtime_tmpdir=None,
|
||||
console=False,
|
||||
disable_windowed_traceback=False,
|
||||
argv_emulation=False,
|
||||
target_arch=None,
|
||||
codesign_identity=None,
|
||||
entitlements_file=None,
|
||||
)
|
||||
Reference in new issue
Block a user