Add Scribd PDF Downloader under Scribd/
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
commit
5d2933ea95
28 files changed
+2159
No files matched your search
@@ -0,0 +1,98 @@
|
||||
# -*- mode: python ; coding: utf-8 -*-
|
||||
# PyInstaller spec for Scribd PDF Downloader (GUI).
|
||||
# Build from project root:
|
||||
# .\build\windows\build.ps1
|
||||
# ./build/macos/build.sh
|
||||
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
import playwright
|
||||
|
||||
block_cipher = None
|
||||
# SPECPATH is the directory containing this spec file (build/)
|
||||
ROOT = Path(SPECPATH).parent
|
||||
HOOKS = Path(playwright.__file__).parent / "_impl" / "__pyinstaller"
|
||||
|
||||
datas = [(str(ROOT / "config.ini"), ".")]
|
||||
|
||||
hiddenimports = [
|
||||
"scribd_downloader",
|
||||
"scribd_downloader.auth",
|
||||
"scribd_downloader.book",
|
||||
"scribd_downloader.document",
|
||||
"scribd_downloader.pages",
|
||||
"scribd_downloader.preview",
|
||||
"scribd_downloader.url",
|
||||
"playwright",
|
||||
"playwright.sync_api",
|
||||
"playwright.sync_api._generated",
|
||||
"greenlet",
|
||||
"img2pdf",
|
||||
"pikepdf",
|
||||
"PIL",
|
||||
"PIL.Image",
|
||||
"PIL.ImageTk",
|
||||
]
|
||||
|
||||
a = Analysis(
|
||||
[str(ROOT / "gui.py")],
|
||||
pathex=[str(ROOT)],
|
||||
binaries=[],
|
||||
datas=datas,
|
||||
hiddenimports=hiddenimports,
|
||||
hookspath=[str(HOOKS)],
|
||||
hooksconfig={},
|
||||
runtime_hooks=[str(ROOT / "build" / "runtime_hook.py")],
|
||||
excludes=[],
|
||||
win_no_prefer_redirects=False,
|
||||
win_private_assemblies=False,
|
||||
cipher=block_cipher,
|
||||
noarchive=False,
|
||||
)
|
||||
|
||||
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
|
||||
|
||||
exe = EXE(
|
||||
pyz,
|
||||
a.scripts,
|
||||
[],
|
||||
exclude_binaries=True,
|
||||
name="Scribd PDF Downloader",
|
||||
debug=False,
|
||||
bootloader_ignore_signals=False,
|
||||
strip=False,
|
||||
upx=False,
|
||||
console=False,
|
||||
disable_windowed_traceback=False,
|
||||
argv_emulation=False,
|
||||
target_arch=None,
|
||||
codesign_identity=None,
|
||||
entitlements_file=None,
|
||||
)
|
||||
|
||||
coll = COLLECT(
|
||||
exe,
|
||||
a.binaries,
|
||||
a.datas,
|
||||
strip=False,
|
||||
upx=False,
|
||||
upx_exclude=[],
|
||||
name="Scribd PDF Downloader",
|
||||
)
|
||||
|
||||
# macOS .app bundle (only used when building on Darwin)
|
||||
if sys.platform == "darwin":
|
||||
app = BUNDLE(
|
||||
coll,
|
||||
name="Scribd PDF Downloader.app",
|
||||
icon=None,
|
||||
bundle_identifier="com.scribd.pdfdownloader",
|
||||
info_plist={
|
||||
"CFBundleName": "Scribd PDF Downloader",
|
||||
"CFBundleDisplayName": "Scribd PDF Downloader",
|
||||
"CFBundleVersion": "1.0.0",
|
||||
"CFBundleShortVersionString": "1.0.0",
|
||||
"NSHighResolutionCapable": True,
|
||||
},
|
||||
)
|
||||
Reference in new issue
Block a user