splitguides 0.10.2__tar.gz → 0.10.3__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.
Files changed (70) hide show
  1. {splitguides-0.10.2 → splitguides-0.10.3}/.github/workflows/build-exe.yml +1 -1
  2. {splitguides-0.10.2 → splitguides-0.10.3}/.github/workflows/publish_to_pypi.yml +1 -1
  3. {splitguides-0.10.2 → splitguides-0.10.3}/PKG-INFO +5 -3
  4. {splitguides-0.10.2 → splitguides-0.10.3}/readme.md +4 -2
  5. splitguides-0.10.3/src/splitguides/_version.py +2 -0
  6. {splitguides-0.10.2 → splitguides-0.10.3}/src/splitguides/server/__main__.py +11 -2
  7. {splitguides-0.10.2 → splitguides-0.10.3}/src/splitguides/server/split_server.py +11 -1
  8. {splitguides-0.10.2 → splitguides-0.10.3}/src/splitguides/ui/custom_elements/__init__.py +1 -1
  9. {splitguides-0.10.2 → splitguides-0.10.3}/src/splitguides/ui/main_window.py +10 -1
  10. {splitguides-0.10.2 → splitguides-0.10.3}/src/splitguides.egg-info/PKG-INFO +5 -3
  11. {splitguides-0.10.2 → splitguides-0.10.3}/tests/test_ui/test_main_window.py +4 -1
  12. splitguides-0.10.2/src/splitguides/_version.py +0 -2
  13. {splitguides-0.10.2 → splitguides-0.10.3}/.coveragerc +0 -0
  14. {splitguides-0.10.2 → splitguides-0.10.3}/.github/dependabot.yml +0 -0
  15. {splitguides-0.10.2 → splitguides-0.10.3}/.github/workflows/auto-test.yml +0 -0
  16. {splitguides-0.10.2 → splitguides-0.10.3}/.github/workflows/test-builds.yml +0 -0
  17. {splitguides-0.10.2 → splitguides-0.10.3}/.gitignore +0 -0
  18. {splitguides-0.10.2 → splitguides-0.10.3}/COPYING +0 -0
  19. {splitguides-0.10.2 → splitguides-0.10.3}/MANIFEST.in +0 -0
  20. {splitguides-0.10.2 → splitguides-0.10.3}/application/setup.py +0 -0
  21. {splitguides-0.10.2 → splitguides-0.10.3}/images/splitguides_server_example.jpg +0 -0
  22. {splitguides-0.10.2 → splitguides-0.10.3}/images/splits_example.png +0 -0
  23. {splitguides-0.10.2 → splitguides-0.10.3}/pyproject.toml +0 -0
  24. {splitguides-0.10.2 → splitguides-0.10.3}/scripts/clean_compiled_ui_files.py +0 -0
  25. {splitguides-0.10.2 → splitguides-0.10.3}/setup.cfg +0 -0
  26. {splitguides-0.10.2 → splitguides-0.10.3}/setup.py +0 -0
  27. {splitguides-0.10.2 → splitguides-0.10.3}/src/splitguides/__init__.py +0 -0
  28. {splitguides-0.10.2 → splitguides-0.10.3}/src/splitguides/__main__.py +0 -0
  29. {splitguides-0.10.2 → splitguides-0.10.3}/src/splitguides/build_ui.py +0 -0
  30. {splitguides-0.10.2 → splitguides-0.10.3}/src/splitguides/exceptions.py +0 -0
  31. {splitguides-0.10.2 → splitguides-0.10.3}/src/splitguides/hotkeys.py +0 -0
  32. {splitguides-0.10.2 → splitguides-0.10.3}/src/splitguides/livesplit_client.py +0 -0
  33. {splitguides-0.10.2 → splitguides-0.10.3}/src/splitguides/note_parser.py +0 -0
  34. {splitguides-0.10.2 → splitguides-0.10.3}/src/splitguides/resources/logo_alpha.ico +0 -0
  35. {splitguides-0.10.2 → splitguides-0.10.3}/src/splitguides/resources/logo_alpha.png +0 -0
  36. {splitguides-0.10.2 → splitguides-0.10.3}/src/splitguides/server/__init__.py +0 -0
  37. {splitguides-0.10.2 → splitguides-0.10.3}/src/splitguides/settings.py +0 -0
  38. {splitguides-0.10.2 → splitguides-0.10.3}/src/splitguides/static/desktop.css +0 -0
  39. {splitguides-0.10.2 → splitguides-0.10.3}/src/splitguides/static/server.css +0 -0
  40. {splitguides-0.10.2 → splitguides-0.10.3}/src/splitguides/static/streamlistener.js +0 -0
  41. {splitguides-0.10.2 → splitguides-0.10.3}/src/splitguides/templates/desktop.html +0 -0
  42. {splitguides-0.10.2 → splitguides-0.10.3}/src/splitguides/templates/server.html +0 -0
  43. {splitguides-0.10.2 → splitguides-0.10.3}/src/splitguides/ui/__init__.py +0 -0
  44. {splitguides-0.10.2 → splitguides-0.10.3}/src/splitguides/ui/color.py +0 -0
  45. {splitguides-0.10.2 → splitguides-0.10.3}/src/splitguides/ui/hotkey_manager.py +0 -0
  46. {splitguides-0.10.2 → splitguides-0.10.3}/src/splitguides/ui/layouts/__init__.py +0 -0
  47. {splitguides-0.10.2 → splitguides-0.10.3}/src/splitguides/ui/layouts/build/__init__.py +0 -0
  48. {splitguides-0.10.2 → splitguides-0.10.3}/src/splitguides/ui/layouts/build/main_window.py +0 -0
  49. {splitguides-0.10.2 → splitguides-0.10.3}/src/splitguides/ui/layouts/build/server_settings.py +0 -0
  50. {splitguides-0.10.2 → splitguides-0.10.3}/src/splitguides/ui/layouts/build/settings.py +0 -0
  51. {splitguides-0.10.2 → splitguides-0.10.3}/src/splitguides/ui/layouts/main_window.ui +0 -0
  52. {splitguides-0.10.2 → splitguides-0.10.3}/src/splitguides/ui/layouts/server_settings.ui +0 -0
  53. {splitguides-0.10.2 → splitguides-0.10.3}/src/splitguides/ui/layouts/settings.ui +0 -0
  54. {splitguides-0.10.2 → splitguides-0.10.3}/src/splitguides/ui/main.pyproject +0 -0
  55. {splitguides-0.10.2 → splitguides-0.10.3}/src/splitguides/ui/server_settings_ui.py +0 -0
  56. {splitguides-0.10.2 → splitguides-0.10.3}/src/splitguides/ui/settings_ui.py +0 -0
  57. {splitguides-0.10.2 → splitguides-0.10.3}/src/splitguides.egg-info/SOURCES.txt +0 -0
  58. {splitguides-0.10.2 → splitguides-0.10.3}/src/splitguides.egg-info/dependency_links.txt +0 -0
  59. {splitguides-0.10.2 → splitguides-0.10.3}/src/splitguides.egg-info/entry_points.txt +0 -0
  60. {splitguides-0.10.2 → splitguides-0.10.3}/src/splitguides.egg-info/requires.txt +0 -0
  61. {splitguides-0.10.2 → splitguides-0.10.3}/src/splitguides.egg-info/top_level.txt +0 -0
  62. {splitguides-0.10.2 → splitguides-0.10.3}/tests/conftest.py +0 -0
  63. {splitguides-0.10.2 → splitguides-0.10.3}/tests/test_livesplit_client/test_get_client.py +0 -0
  64. {splitguides-0.10.2 → splitguides-0.10.3}/tests/test_livesplit_client/test_messaging.py +0 -0
  65. {splitguides-0.10.2 → splitguides-0.10.3}/tests/test_livesplit_client/test_networking.py +0 -0
  66. {splitguides-0.10.2 → splitguides-0.10.3}/tests/test_parser.py +0 -0
  67. {splitguides-0.10.2 → splitguides-0.10.3}/tests/test_ui/settings.json +0 -0
  68. {splitguides-0.10.2 → splitguides-0.10.3}/tests/test_ui/test_livesplit_link.py +0 -0
  69. {splitguides-0.10.2 → splitguides-0.10.3}/tests/test_ui/test_settings.py +0 -0
  70. {splitguides-0.10.2 → splitguides-0.10.3}/uv.lock +0 -0
@@ -45,7 +45,7 @@ jobs:
45
45
  name: splitguides-app
46
46
  path: dist/
47
47
  - name: Sign the zipapp with Sigstore
48
- uses: sigstore/gh-action-sigstore-python@v3.0.0
48
+ uses: sigstore/gh-action-sigstore-python@v3.0.1
49
49
  with:
50
50
  release-signing-artifacts: false
51
51
  inputs: >-
@@ -69,7 +69,7 @@ jobs:
69
69
  name: python-package-distributions
70
70
  path: dist/
71
71
  - name: Sign the dists with Sigstore
72
- uses: sigstore/gh-action-sigstore-python@v3.0.0
72
+ uses: sigstore/gh-action-sigstore-python@v3.0.1
73
73
  with:
74
74
  release-signing-artifacts: false
75
75
  inputs: >-
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: splitguides
3
- Version: 0.10.2
3
+ Version: 0.10.3
4
4
  Summary: A tool for speedrunners to display notes that advance automatically with their splits in Livesplit.
5
5
  Author: David C Ellis
6
6
  License-Expression: GPL-3.0-or-later
@@ -47,10 +47,12 @@ Includes a server version for rendering notes in browsers on another device
47
47
  #### UV ####
48
48
 
49
49
  If you have [uv](https://docs.astral.sh/uv/) installed you can install and run splitguides
50
- directly from the Python Package Index (PyPI).
50
+ directly from the Python Package Index (PyPI). This is the recommended method for non-windows
51
+ platforms.
51
52
 
52
53
  * Install and run the latest release with `uvx splitguides`
53
-
54
+ * Install and run the current main branch from GitHub with
55
+ `uvx --from git+https://github.com/DavidCEllis/SplitGuides splitguides`
54
56
 
55
57
  ## Usage ##
56
58
 
@@ -22,10 +22,12 @@ Includes a server version for rendering notes in browsers on another device
22
22
  #### UV ####
23
23
 
24
24
  If you have [uv](https://docs.astral.sh/uv/) installed you can install and run splitguides
25
- directly from the Python Package Index (PyPI).
25
+ directly from the Python Package Index (PyPI). This is the recommended method for non-windows
26
+ platforms.
26
27
 
27
28
  * Install and run the latest release with `uvx splitguides`
28
-
29
+ * Install and run the current main branch from GitHub with
30
+ `uvx --from git+https://github.com/DavidCEllis/SplitGuides splitguides`
29
31
 
30
32
  ## Usage ##
31
33
 
@@ -0,0 +1,2 @@
1
+ __version__ = "0.10.3"
2
+ __version_tuple__ = (0, 10, 3)
@@ -1,7 +1,11 @@
1
+ from pathlib import Path
2
+
1
3
  from PySide6.QtWidgets import QApplication, QMainWindow
2
4
  import waitress
3
5
 
4
6
  from splitguides.server import app, get_notes, settings
7
+ from splitguides.server import split_server
8
+
5
9
  from splitguides.ui.server_settings_ui import ServerSettingsDialog
6
10
 
7
11
 
@@ -30,10 +34,15 @@ def launch():
30
34
  print(
31
35
  "This server version of SplitGuides allows you view notes via a browser window "
32
36
  "and should work across a local network.\n"
33
- "This uses a development server and is not intended "
34
- "to be used over the internet."
37
+ "This is not intended to be used over the internet or on public networks."
35
38
  )
36
39
 
40
+ # Access via split_server as this value gets replaced only after get_notes
41
+ assert isinstance(split_server.notefile, Path) # True due to success of get_notes
42
+ notefolder = Path(split_server.notefile).parent
43
+
44
+ print(f"Serving contents of '{notefolder}' for relative links")
45
+
37
46
  print(
38
47
  f"Connect a browser to "
39
48
  f"http://{settings.server_hostname}:{settings.server_port}/ "
@@ -4,7 +4,7 @@ import string
4
4
  import time
5
5
  from pathlib import Path
6
6
 
7
- from flask import Flask, render_template, Response
7
+ from flask import Flask, Response, render_template, send_from_directory
8
8
  from PySide6.QtWidgets import QFileDialog
9
9
 
10
10
  from ..settings import ServerSettings
@@ -107,6 +107,16 @@ def split():
107
107
  return Response(event_stream(), mimetype="text/event-stream")
108
108
 
109
109
 
110
+ @app.route("/<path:filename>")
111
+ def serve_file(filename):
112
+ global notefile
113
+ assert isinstance(notefile, Path)
114
+
115
+ fld = notefile.parent
116
+
117
+ return send_from_directory(fld, filename)
118
+
119
+
110
120
  def get_notes(parent):
111
121
  global notes, notefile
112
122
 
@@ -12,7 +12,7 @@ class ExtLinkWebEnginePage(QWebEnginePage):
12
12
 
13
13
  def acceptNavigationRequest(self, url, _type, is_mainframe):
14
14
  # Launch external browser for clicking links, otherwise do default behaviour
15
- if _type == QWebEnginePage.NavigationTypeLinkClicked:
15
+ if _type == QWebEnginePage.NavigationType.NavigationTypeLinkClicked:
16
16
  QDesktopServices.openUrl(url)
17
17
  return False
18
18
  return super().acceptNavigationRequest(url, _type, is_mainframe)
@@ -12,6 +12,7 @@ from jinja2 import Environment, FileSystemLoader, Template
12
12
  from PySide6 import QtCore
13
13
  from PySide6.QtGui import QColorConstants, QCursor, QIcon, QMouseEvent, QAction
14
14
  from PySide6.QtWidgets import QMainWindow, QFileDialog, QMenu, QErrorMessage
15
+ from PySide6.QtWebEngineCore import QWebEngineSettings
15
16
 
16
17
  from .color import rgba_to_qss
17
18
  from .custom_elements import ExtLinkWebEnginePage
@@ -272,6 +273,12 @@ class MainWindow(QMainWindow):
272
273
  self.ui.notes.customContextMenuRequested.connect(self.show_menu)
273
274
  # Allow links to open in an external browser
274
275
  page = ExtLinkWebEnginePage(self, backgroundColor=QColorConstants.Transparent)
276
+
277
+ # Make webengine allow access to remote and local images from local files
278
+ _websettings = page.settings()
279
+ _websettings.setAttribute(QWebEngineSettings.WebAttribute.LocalContentCanAccessRemoteUrls, True)
280
+ _websettings.setAttribute(QWebEngineSettings.WebAttribute.LocalContentCanAccessFileUrls, True)
281
+
275
282
  self.ui.notes.setPage(page)
276
283
 
277
284
  def build_menu(self):
@@ -378,7 +385,9 @@ class MainWindow(QMainWindow):
378
385
  notes=self.notes.render_splits(start, end),
379
386
  )
380
387
 
381
- self.ui.notes.setHtml(html, baseUrl=self.notefile)
388
+ note_uri = Path(self.notefile).absolute().as_uri()
389
+
390
+ self.ui.notes.setHtml(html, baseUrl=note_uri)
382
391
  self.split_index = idx
383
392
 
384
393
  def open_settings(self):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: splitguides
3
- Version: 0.10.2
3
+ Version: 0.10.3
4
4
  Summary: A tool for speedrunners to display notes that advance automatically with their splits in Livesplit.
5
5
  Author: David C Ellis
6
6
  License-Expression: GPL-3.0-or-later
@@ -47,10 +47,12 @@ Includes a server version for rendering notes in browsers on another device
47
47
  #### UV ####
48
48
 
49
49
  If you have [uv](https://docs.astral.sh/uv/) installed you can install and run splitguides
50
- directly from the Python Package Index (PyPI).
50
+ directly from the Python Package Index (PyPI). This is the recommended method for non-windows
51
+ platforms.
51
52
 
52
53
  * Install and run the latest release with `uvx splitguides`
53
-
54
+ * Install and run the current main branch from GitHub with
55
+ `uvx --from git+https://github.com/DavidCEllis/SplitGuides splitguides`
54
56
 
55
57
  ## Usage ##
56
58
 
@@ -223,7 +223,10 @@ def test_update_notes(qtbot, fake_link, idx):
223
223
  css=main_window.css,
224
224
  notes="Fake Splits",
225
225
  )
226
- fake_note_ui.setHtml.assert_called_once_with("Fake HTML", baseUrl="Notes_URL")
226
+
227
+ note_path = Path("Notes_URL").absolute().as_uri()
228
+
229
+ fake_note_ui.setHtml.assert_called_once_with("Fake HTML", baseUrl=note_path)
227
230
 
228
231
  assert main_window.split_index == used_idx
229
232
 
@@ -1,2 +0,0 @@
1
- __version__ = "0.10.2"
2
- __version_tuple__ = (0, 10, 2)
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes