pyloid 0.20.0__tar.gz → 0.20.1.dev0__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.
- {pyloid-0.20.0 → pyloid-0.20.1.dev0}/PKG-INFO +2 -3
- {pyloid-0.20.0 → pyloid-0.20.1.dev0}/README.md +1 -1
- {pyloid-0.20.0 → pyloid-0.20.1.dev0}/pyproject.toml +1 -2
- {pyloid-0.20.0 → pyloid-0.20.1.dev0}/src/pyloid/browser_window.py +33 -1
- {pyloid-0.20.0 → pyloid-0.20.1.dev0}/src/pyloid/builder/__init__.py +17 -16
- {pyloid-0.20.0 → pyloid-0.20.1.dev0}/LICENSE +0 -0
- {pyloid-0.20.0 → pyloid-0.20.1.dev0}/src/pyloid/__init__.py +0 -0
- {pyloid-0.20.0 → pyloid-0.20.1.dev0}/src/pyloid/api.py +0 -0
- {pyloid-0.20.0 → pyloid-0.20.1.dev0}/src/pyloid/autostart.py +0 -0
- {pyloid-0.20.0 → pyloid-0.20.1.dev0}/src/pyloid/builder/build_config.schema.json +0 -0
- {pyloid-0.20.0 → pyloid-0.20.1.dev0}/src/pyloid/builder/spec.py +0 -0
- {pyloid-0.20.0 → pyloid-0.20.1.dev0}/src/pyloid/custom/titlebar.py +0 -0
- {pyloid-0.20.0 → pyloid-0.20.1.dev0}/src/pyloid/filewatcher.py +0 -0
- {pyloid-0.20.0 → pyloid-0.20.1.dev0}/src/pyloid/js_api/event_api.py +0 -0
- {pyloid-0.20.0 → pyloid-0.20.1.dev0}/src/pyloid/js_api/window_api.py +0 -0
- {pyloid-0.20.0 → pyloid-0.20.1.dev0}/src/pyloid/monitor.py +0 -0
- {pyloid-0.20.0 → pyloid-0.20.1.dev0}/src/pyloid/pyloid.py +0 -0
- {pyloid-0.20.0 → pyloid-0.20.1.dev0}/src/pyloid/thread_pool.py +0 -0
- {pyloid-0.20.0 → pyloid-0.20.1.dev0}/src/pyloid/timer.py +0 -0
- {pyloid-0.20.0 → pyloid-0.20.1.dev0}/src/pyloid/tray.py +0 -0
- {pyloid-0.20.0 → pyloid-0.20.1.dev0}/src/pyloid/utils.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: pyloid
|
3
|
-
Version: 0.20.
|
3
|
+
Version: 0.20.1.dev0
|
4
4
|
Summary:
|
5
5
|
Author: aesthetics-of-record
|
6
6
|
Author-email: 111675679+aesthetics-of-record@users.noreply.github.com
|
@@ -10,7 +10,6 @@ Classifier: Programming Language :: Python :: 3.9
|
|
10
10
|
Classifier: Programming Language :: Python :: 3.10
|
11
11
|
Classifier: Programming Language :: Python :: 3.11
|
12
12
|
Classifier: Programming Language :: Python :: 3.12
|
13
|
-
Requires-Dist: pyinstaller (>=6.11.1,<7.0.0)
|
14
13
|
Requires-Dist: pyside6 (>=6.8.1,<7.0.0)
|
15
14
|
Description-Content-Type: text/markdown
|
16
15
|
|
@@ -86,7 +85,7 @@ This project uses PySide6, which is licensed under the LGPL (Lesser General Publ
|
|
86
85
|
|
87
86
|
## Contributing 🤝
|
88
87
|
|
89
|
-
|
88
|
+
Not Yet
|
90
89
|
|
91
90
|
## Issues
|
92
91
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "pyloid"
|
3
|
-
version = "0.20.
|
3
|
+
version = "0.20.1-dev"
|
4
4
|
description = ""
|
5
5
|
authors = ["aesthetics-of-record <111675679+aesthetics-of-record@users.noreply.github.com>"]
|
6
6
|
readme = "README.md"
|
@@ -11,7 +11,6 @@ packages = [
|
|
11
11
|
[tool.poetry.dependencies]
|
12
12
|
python = ">=3.9,<3.14"
|
13
13
|
pyside6 = "^6.8.1"
|
14
|
-
pyinstaller = "^6.11.1"
|
15
14
|
|
16
15
|
|
17
16
|
[build-system]
|
@@ -26,7 +26,8 @@ from PySide6.QtGui import QPixmap, QMovie
|
|
26
26
|
from PySide6.QtWidgets import QSplashScreen, QLabel
|
27
27
|
from PySide6.QtCore import QSize
|
28
28
|
from typing import TYPE_CHECKING
|
29
|
-
from PySide6.QtWebEngineCore import QWebEngineSettings
|
29
|
+
from PySide6.QtWebEngineCore import QWebEngineSettings, QWebEngineUrlRequestInterceptor
|
30
|
+
from .utils import get_production_path, is_production
|
30
31
|
|
31
32
|
if TYPE_CHECKING:
|
32
33
|
from ..pyloid import Pyloid
|
@@ -66,6 +67,26 @@ class CustomWebPage(QWebEnginePage):
|
|
66
67
|
# """desktop media handler"""
|
67
68
|
# self._desktop_media_handler = handler
|
68
69
|
|
70
|
+
class CustomInterceptor(QWebEngineUrlRequestInterceptor):
|
71
|
+
def __init__(self, index_path=None):
|
72
|
+
super().__init__()
|
73
|
+
self.index_path = get_production_path()
|
74
|
+
self.last_path = "/"
|
75
|
+
|
76
|
+
def interceptRequest(self, info):
|
77
|
+
url = info.requestUrl()
|
78
|
+
navigation_type = info.navigationType()
|
79
|
+
|
80
|
+
print("--------------------------------")
|
81
|
+
|
82
|
+
print(url)
|
83
|
+
print(url.scheme())
|
84
|
+
print(url.host())
|
85
|
+
print(url.url())
|
86
|
+
print(self.last_path)
|
87
|
+
|
88
|
+
self.last_path = url.path()
|
89
|
+
|
69
90
|
|
70
91
|
class CustomWebEngineView(QWebEngineView):
|
71
92
|
def __init__(self, parent: "BrowserWindow" = None):
|
@@ -391,6 +412,17 @@ class BrowserWindow:
|
|
391
412
|
|
392
413
|
# Set F12 shortcut
|
393
414
|
self.set_dev_tools(self.dev_tools)
|
415
|
+
|
416
|
+
# 프로필 가져오기 및 인터셉터 설정
|
417
|
+
profile = self.web_view.page().profile()
|
418
|
+
|
419
|
+
# # 기존 인터셉터가 있다면 제거
|
420
|
+
# if self.interceptor:
|
421
|
+
# profile.setUrlRequestInterceptor(None)
|
422
|
+
|
423
|
+
# 새 인터셉터 설정
|
424
|
+
self.interceptor = CustomInterceptor()
|
425
|
+
profile.setUrlRequestInterceptor(self.interceptor)
|
394
426
|
|
395
427
|
def _on_load_finished(self, ok):
|
396
428
|
"""Handles the event when the web page finishes loading."""
|
@@ -25,22 +25,23 @@ def cleanup_before_build(json_path):
|
|
25
25
|
if not dist_dir.exists():
|
26
26
|
raise Exception(f"Cannot find directory to clean: {dist_dir}")
|
27
27
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
28
|
+
print("\033[1;34mCleaning up unnecessary files...\033[0m")
|
29
|
+
exclude_patterns = [p[1:] for p in cleanup_patterns if p.startswith('!')]
|
30
|
+
include_patterns = [p for p in cleanup_patterns if not p.startswith('!')]
|
31
|
+
|
32
|
+
for pattern in include_patterns:
|
33
|
+
matching_files = list(dist_dir.glob(pattern))
|
34
|
+
for file_path in matching_files:
|
35
|
+
if any(file_path.match(p) for p in exclude_patterns):
|
36
|
+
print(f"\033[33mSkipping: {file_path}\033[0m")
|
37
|
+
continue
|
38
|
+
print(f"\033[33mRemoving: {file_path}\033[0m")
|
39
|
+
if file_path.is_dir():
|
40
|
+
shutil.rmtree(file_path)
|
41
|
+
else:
|
42
|
+
file_path.unlink()
|
43
|
+
print(f"\033[32mRemoved: {file_path}\033[0m")
|
44
|
+
|
44
45
|
print("\033[1;32mFile cleanup completed.\033[0m")
|
45
46
|
|
46
47
|
except Exception as e:
|
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
|