splitguides 0.10.1__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.1 → splitguides-0.10.3}/.github/workflows/build-exe.yml +1 -1
  2. {splitguides-0.10.1 → splitguides-0.10.3}/.github/workflows/publish_to_pypi.yml +1 -1
  3. {splitguides-0.10.1 → splitguides-0.10.3}/PKG-INFO +17 -3
  4. {splitguides-0.10.1 → splitguides-0.10.3}/application/setup.py +2 -2
  5. {splitguides-0.10.1 → splitguides-0.10.3}/readme.md +16 -2
  6. splitguides-0.10.3/src/splitguides/_version.py +2 -0
  7. {splitguides-0.10.1 → splitguides-0.10.3}/src/splitguides/server/__main__.py +11 -2
  8. {splitguides-0.10.1 → splitguides-0.10.3}/src/splitguides/server/split_server.py +11 -1
  9. {splitguides-0.10.1 → splitguides-0.10.3}/src/splitguides/ui/custom_elements/__init__.py +1 -1
  10. {splitguides-0.10.1 → splitguides-0.10.3}/src/splitguides/ui/main_window.py +11 -2
  11. {splitguides-0.10.1 → splitguides-0.10.3}/src/splitguides.egg-info/PKG-INFO +17 -3
  12. {splitguides-0.10.1 → splitguides-0.10.3}/src/splitguides.egg-info/SOURCES.txt +4 -4
  13. {splitguides-0.10.1 → splitguides-0.10.3}/tests/test_ui/test_main_window.py +4 -1
  14. splitguides-0.10.1/src/splitguides/_version.py +0 -2
  15. {splitguides-0.10.1 → splitguides-0.10.3}/.coveragerc +0 -0
  16. {splitguides-0.10.1 → splitguides-0.10.3}/.github/dependabot.yml +0 -0
  17. {splitguides-0.10.1 → splitguides-0.10.3}/.github/workflows/auto-test.yml +0 -0
  18. {splitguides-0.10.1 → splitguides-0.10.3}/.github/workflows/test-builds.yml +0 -0
  19. {splitguides-0.10.1 → splitguides-0.10.3}/.gitignore +0 -0
  20. {splitguides-0.10.1 → splitguides-0.10.3}/COPYING +0 -0
  21. {splitguides-0.10.1 → splitguides-0.10.3}/MANIFEST.in +0 -0
  22. {splitguides-0.10.1/resources → splitguides-0.10.3/images}/splitguides_server_example.jpg +0 -0
  23. {splitguides-0.10.1/resources → splitguides-0.10.3/images}/splits_example.png +0 -0
  24. {splitguides-0.10.1 → splitguides-0.10.3}/pyproject.toml +0 -0
  25. {splitguides-0.10.1 → splitguides-0.10.3}/scripts/clean_compiled_ui_files.py +0 -0
  26. {splitguides-0.10.1 → splitguides-0.10.3}/setup.cfg +0 -0
  27. {splitguides-0.10.1 → splitguides-0.10.3}/setup.py +0 -0
  28. {splitguides-0.10.1 → splitguides-0.10.3}/src/splitguides/__init__.py +0 -0
  29. {splitguides-0.10.1 → splitguides-0.10.3}/src/splitguides/__main__.py +0 -0
  30. {splitguides-0.10.1 → splitguides-0.10.3}/src/splitguides/build_ui.py +0 -0
  31. {splitguides-0.10.1 → splitguides-0.10.3}/src/splitguides/exceptions.py +0 -0
  32. {splitguides-0.10.1 → splitguides-0.10.3}/src/splitguides/hotkeys.py +0 -0
  33. {splitguides-0.10.1 → splitguides-0.10.3}/src/splitguides/livesplit_client.py +0 -0
  34. {splitguides-0.10.1 → splitguides-0.10.3}/src/splitguides/note_parser.py +0 -0
  35. {splitguides-0.10.1 → splitguides-0.10.3/src/splitguides}/resources/logo_alpha.ico +0 -0
  36. {splitguides-0.10.1 → splitguides-0.10.3/src/splitguides}/resources/logo_alpha.png +0 -0
  37. {splitguides-0.10.1 → splitguides-0.10.3}/src/splitguides/server/__init__.py +0 -0
  38. {splitguides-0.10.1 → splitguides-0.10.3}/src/splitguides/settings.py +0 -0
  39. {splitguides-0.10.1 → splitguides-0.10.3}/src/splitguides/static/desktop.css +0 -0
  40. {splitguides-0.10.1 → splitguides-0.10.3}/src/splitguides/static/server.css +0 -0
  41. {splitguides-0.10.1 → splitguides-0.10.3}/src/splitguides/static/streamlistener.js +0 -0
  42. {splitguides-0.10.1 → splitguides-0.10.3}/src/splitguides/templates/desktop.html +0 -0
  43. {splitguides-0.10.1 → splitguides-0.10.3}/src/splitguides/templates/server.html +0 -0
  44. {splitguides-0.10.1 → splitguides-0.10.3}/src/splitguides/ui/__init__.py +0 -0
  45. {splitguides-0.10.1 → splitguides-0.10.3}/src/splitguides/ui/color.py +0 -0
  46. {splitguides-0.10.1 → splitguides-0.10.3}/src/splitguides/ui/hotkey_manager.py +0 -0
  47. {splitguides-0.10.1 → splitguides-0.10.3}/src/splitguides/ui/layouts/__init__.py +0 -0
  48. {splitguides-0.10.1 → splitguides-0.10.3}/src/splitguides/ui/layouts/build/__init__.py +0 -0
  49. {splitguides-0.10.1 → splitguides-0.10.3}/src/splitguides/ui/layouts/build/main_window.py +0 -0
  50. {splitguides-0.10.1 → splitguides-0.10.3}/src/splitguides/ui/layouts/build/server_settings.py +0 -0
  51. {splitguides-0.10.1 → splitguides-0.10.3}/src/splitguides/ui/layouts/build/settings.py +0 -0
  52. {splitguides-0.10.1 → splitguides-0.10.3}/src/splitguides/ui/layouts/main_window.ui +0 -0
  53. {splitguides-0.10.1 → splitguides-0.10.3}/src/splitguides/ui/layouts/server_settings.ui +0 -0
  54. {splitguides-0.10.1 → splitguides-0.10.3}/src/splitguides/ui/layouts/settings.ui +0 -0
  55. {splitguides-0.10.1 → splitguides-0.10.3}/src/splitguides/ui/main.pyproject +0 -0
  56. {splitguides-0.10.1 → splitguides-0.10.3}/src/splitguides/ui/server_settings_ui.py +0 -0
  57. {splitguides-0.10.1 → splitguides-0.10.3}/src/splitguides/ui/settings_ui.py +0 -0
  58. {splitguides-0.10.1 → splitguides-0.10.3}/src/splitguides.egg-info/dependency_links.txt +0 -0
  59. {splitguides-0.10.1 → splitguides-0.10.3}/src/splitguides.egg-info/entry_points.txt +0 -0
  60. {splitguides-0.10.1 → splitguides-0.10.3}/src/splitguides.egg-info/requires.txt +0 -0
  61. {splitguides-0.10.1 → splitguides-0.10.3}/src/splitguides.egg-info/top_level.txt +0 -0
  62. {splitguides-0.10.1 → splitguides-0.10.3}/tests/conftest.py +0 -0
  63. {splitguides-0.10.1 → splitguides-0.10.3}/tests/test_livesplit_client/test_get_client.py +0 -0
  64. {splitguides-0.10.1 → splitguides-0.10.3}/tests/test_livesplit_client/test_messaging.py +0 -0
  65. {splitguides-0.10.1 → splitguides-0.10.3}/tests/test_livesplit_client/test_networking.py +0 -0
  66. {splitguides-0.10.1 → splitguides-0.10.3}/tests/test_parser.py +0 -0
  67. {splitguides-0.10.1 → splitguides-0.10.3}/tests/test_ui/settings.json +0 -0
  68. {splitguides-0.10.1 → splitguides-0.10.3}/tests/test_ui/test_livesplit_link.py +0 -0
  69. {splitguides-0.10.1 → splitguides-0.10.3}/tests/test_ui/test_settings.py +0 -0
  70. {splitguides-0.10.1 → 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.1
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
@@ -35,11 +35,25 @@ Includes a server version for rendering notes in browsers on another device
35
35
 
36
36
  ## Install/Setup ##
37
37
 
38
+ ### Standalone Bundle for Windows ###
39
+
38
40
  1. Download `SplitGuides_v<VERSION>.zip` from the
39
41
  [**releases page**](https://github.com/DavidCEllis/SplitGuides/releases)
40
42
  Where `<VERSION>` is the version number of the release.
41
43
  2. Extract anywhere and run *splitguides.exe*
42
44
 
45
+ ### Using Python Packaging tools ###
46
+
47
+ #### UV ####
48
+
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). This is the recommended method for non-windows
51
+ platforms.
52
+
53
+ * Install and run the latest release with `uvx splitguides`
54
+ * Install and run the current main branch from GitHub with
55
+ `uvx --from git+https://github.com/DavidCEllis/SplitGuides splitguides`
56
+
43
57
  ## Usage ##
44
58
 
45
59
  1. Connect with livesplit by starting the livesplit server component selecting
@@ -148,11 +162,11 @@ Configuration Options:
148
162
 
149
163
  On Desktop:
150
164
 
151
- ![Image of splitguides rendering](resources/splits_example.png)
165
+ ![Image of splitguides rendering](images/splits_example.png)
152
166
 
153
167
  Via Splitnotes Server on Tablet:
154
168
 
155
- ![Image of splitguides server - yes this is an old iPad](resources/splitguides_server_example.jpg)
169
+ ![Image of splitguides server - yes this is an old iPad](images/splitguides_server_example.jpg)
156
170
 
157
171
  ## Development ##
158
172
 
@@ -21,8 +21,8 @@ server_app = str(base_path / "src" / "splitguides" / "server" / "__main__.py")
21
21
 
22
22
  templates = str(base_path / "src" / "splitguides" / "templates")
23
23
  static_folder = str(base_path / "src" / "splitguides" / "static")
24
- icon_file = str(base_path / "resources" / "logo_alpha.ico")
25
- icon_png = str(base_path / "resources" / "logo_alpha.png")
24
+ icon_file = str(base_path / "src" / "splitguides" / "resources" / "logo_alpha.ico")
25
+ icon_png = str(base_path / "src" / "splitguides" / "resources" / "logo_alpha.png")
26
26
  readme = str(base_path / "readme.md")
27
27
  license_file = str(base_path / "COPYING")
28
28
 
@@ -10,11 +10,25 @@ Includes a server version for rendering notes in browsers on another device
10
10
 
11
11
  ## Install/Setup ##
12
12
 
13
+ ### Standalone Bundle for Windows ###
14
+
13
15
  1. Download `SplitGuides_v<VERSION>.zip` from the
14
16
  [**releases page**](https://github.com/DavidCEllis/SplitGuides/releases)
15
17
  Where `<VERSION>` is the version number of the release.
16
18
  2. Extract anywhere and run *splitguides.exe*
17
19
 
20
+ ### Using Python Packaging tools ###
21
+
22
+ #### UV ####
23
+
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). This is the recommended method for non-windows
26
+ platforms.
27
+
28
+ * Install and run the latest release with `uvx splitguides`
29
+ * Install and run the current main branch from GitHub with
30
+ `uvx --from git+https://github.com/DavidCEllis/SplitGuides splitguides`
31
+
18
32
  ## Usage ##
19
33
 
20
34
  1. Connect with livesplit by starting the livesplit server component selecting
@@ -123,11 +137,11 @@ Configuration Options:
123
137
 
124
138
  On Desktop:
125
139
 
126
- ![Image of splitguides rendering](resources/splits_example.png)
140
+ ![Image of splitguides rendering](images/splits_example.png)
127
141
 
128
142
  Via Splitnotes Server on Tablet:
129
143
 
130
- ![Image of splitguides server - yes this is an old iPad](resources/splitguides_server_example.jpg)
144
+ ![Image of splitguides server - yes this is an old iPad](images/splitguides_server_example.jpg)
131
145
 
132
146
  ## Development ##
133
147
 
@@ -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
@@ -32,7 +33,7 @@ if getattr(sys, "frozen", False): # pragma: nocover
32
33
  else:
33
34
  # Running locally
34
35
  base_path = Path(__file__).parent
35
- icon_file = str(base_path.parents[2] / "resources" / "logo_alpha.png")
36
+ icon_file = str(base_path.parent / "resources" / "logo_alpha.png")
36
37
 
37
38
 
38
39
  class MainWindow(QMainWindow):
@@ -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.1
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
@@ -35,11 +35,25 @@ Includes a server version for rendering notes in browsers on another device
35
35
 
36
36
  ## Install/Setup ##
37
37
 
38
+ ### Standalone Bundle for Windows ###
39
+
38
40
  1. Download `SplitGuides_v<VERSION>.zip` from the
39
41
  [**releases page**](https://github.com/DavidCEllis/SplitGuides/releases)
40
42
  Where `<VERSION>` is the version number of the release.
41
43
  2. Extract anywhere and run *splitguides.exe*
42
44
 
45
+ ### Using Python Packaging tools ###
46
+
47
+ #### UV ####
48
+
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). This is the recommended method for non-windows
51
+ platforms.
52
+
53
+ * Install and run the latest release with `uvx splitguides`
54
+ * Install and run the current main branch from GitHub with
55
+ `uvx --from git+https://github.com/DavidCEllis/SplitGuides splitguides`
56
+
43
57
  ## Usage ##
44
58
 
45
59
  1. Connect with livesplit by starting the livesplit server component selecting
@@ -148,11 +162,11 @@ Configuration Options:
148
162
 
149
163
  On Desktop:
150
164
 
151
- ![Image of splitguides rendering](resources/splits_example.png)
165
+ ![Image of splitguides rendering](images/splits_example.png)
152
166
 
153
167
  Via Splitnotes Server on Tablet:
154
168
 
155
- ![Image of splitguides server - yes this is an old iPad](resources/splitguides_server_example.jpg)
169
+ ![Image of splitguides server - yes this is an old iPad](images/splitguides_server_example.jpg)
156
170
 
157
171
  ## Development ##
158
172
 
@@ -13,10 +13,8 @@ uv.lock
13
13
  .github/workflows/publish_to_pypi.yml
14
14
  .github/workflows/test-builds.yml
15
15
  application/setup.py
16
- resources/logo_alpha.ico
17
- resources/logo_alpha.png
18
- resources/splitguides_server_example.jpg
19
- resources/splits_example.png
16
+ images/splitguides_server_example.jpg
17
+ images/splits_example.png
20
18
  scripts/clean_compiled_ui_files.py
21
19
  src/splitguides/__init__.py
22
20
  src/splitguides/__main__.py
@@ -33,6 +31,8 @@ src/splitguides.egg-info/dependency_links.txt
33
31
  src/splitguides.egg-info/entry_points.txt
34
32
  src/splitguides.egg-info/requires.txt
35
33
  src/splitguides.egg-info/top_level.txt
34
+ src/splitguides/resources/logo_alpha.ico
35
+ src/splitguides/resources/logo_alpha.png
36
36
  src/splitguides/server/__init__.py
37
37
  src/splitguides/server/__main__.py
38
38
  src/splitguides/server/split_server.py
@@ -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.1"
2
- __version_tuple__ = (0, 10, 1)
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes