splitguides 0.10.2__tar.gz → 0.10.4__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 (72) hide show
  1. splitguides-0.10.4/MANIFEST.in +2 -0
  2. {splitguides-0.10.2 → splitguides-0.10.4}/PKG-INFO +7 -4
  3. {splitguides-0.10.2 → splitguides-0.10.4}/pyproject.toml +11 -17
  4. {splitguides-0.10.2 → splitguides-0.10.4}/readme.md +4 -2
  5. splitguides-0.10.4/src/splitguides/_version.py +2 -0
  6. {splitguides-0.10.2 → splitguides-0.10.4}/src/splitguides/server/__main__.py +11 -2
  7. {splitguides-0.10.2 → splitguides-0.10.4}/src/splitguides/server/split_server.py +11 -1
  8. {splitguides-0.10.2 → splitguides-0.10.4}/src/splitguides/settings.py +4 -3
  9. {splitguides-0.10.2 → splitguides-0.10.4}/src/splitguides/ui/custom_elements/__init__.py +1 -1
  10. {splitguides-0.10.2 → splitguides-0.10.4}/src/splitguides/ui/layouts/build/main_window.py +1 -1
  11. {splitguides-0.10.2 → splitguides-0.10.4}/src/splitguides/ui/layouts/build/server_settings.py +1 -1
  12. {splitguides-0.10.2 → splitguides-0.10.4}/src/splitguides/ui/layouts/build/settings.py +1 -1
  13. {splitguides-0.10.2 → splitguides-0.10.4}/src/splitguides/ui/main_window.py +10 -1
  14. {splitguides-0.10.2 → splitguides-0.10.4}/src/splitguides.egg-info/PKG-INFO +7 -4
  15. {splitguides-0.10.2 → splitguides-0.10.4}/src/splitguides.egg-info/SOURCES.txt +0 -7
  16. {splitguides-0.10.2 → splitguides-0.10.4}/src/splitguides.egg-info/requires.txt +2 -1
  17. {splitguides-0.10.2 → splitguides-0.10.4}/tests/test_ui/test_main_window.py +4 -1
  18. splitguides-0.10.4/uv.lock +3434 -0
  19. splitguides-0.10.2/.github/dependabot.yml +0 -7
  20. splitguides-0.10.2/.github/workflows/auto-test.yml +0 -31
  21. splitguides-0.10.2/.github/workflows/build-exe.yml +0 -62
  22. splitguides-0.10.2/.github/workflows/publish_to_pypi.yml +0 -87
  23. splitguides-0.10.2/.github/workflows/test-builds.yml +0 -58
  24. splitguides-0.10.2/MANIFEST.in +0 -9
  25. splitguides-0.10.2/images/splitguides_server_example.jpg +0 -0
  26. splitguides-0.10.2/images/splits_example.png +0 -0
  27. splitguides-0.10.2/src/splitguides/_version.py +0 -2
  28. splitguides-0.10.2/uv.lock +0 -488
  29. {splitguides-0.10.2 → splitguides-0.10.4}/.coveragerc +0 -0
  30. {splitguides-0.10.2 → splitguides-0.10.4}/.gitignore +0 -0
  31. {splitguides-0.10.2 → splitguides-0.10.4}/COPYING +0 -0
  32. {splitguides-0.10.2 → splitguides-0.10.4}/application/setup.py +0 -0
  33. {splitguides-0.10.2 → splitguides-0.10.4}/scripts/clean_compiled_ui_files.py +0 -0
  34. {splitguides-0.10.2 → splitguides-0.10.4}/setup.cfg +0 -0
  35. {splitguides-0.10.2 → splitguides-0.10.4}/setup.py +0 -0
  36. {splitguides-0.10.2 → splitguides-0.10.4}/src/splitguides/__init__.py +0 -0
  37. {splitguides-0.10.2 → splitguides-0.10.4}/src/splitguides/__main__.py +0 -0
  38. {splitguides-0.10.2 → splitguides-0.10.4}/src/splitguides/build_ui.py +0 -0
  39. {splitguides-0.10.2 → splitguides-0.10.4}/src/splitguides/exceptions.py +0 -0
  40. {splitguides-0.10.2 → splitguides-0.10.4}/src/splitguides/hotkeys.py +0 -0
  41. {splitguides-0.10.2 → splitguides-0.10.4}/src/splitguides/livesplit_client.py +0 -0
  42. {splitguides-0.10.2 → splitguides-0.10.4}/src/splitguides/note_parser.py +0 -0
  43. {splitguides-0.10.2 → splitguides-0.10.4}/src/splitguides/resources/logo_alpha.ico +0 -0
  44. {splitguides-0.10.2 → splitguides-0.10.4}/src/splitguides/resources/logo_alpha.png +0 -0
  45. {splitguides-0.10.2 → splitguides-0.10.4}/src/splitguides/server/__init__.py +0 -0
  46. {splitguides-0.10.2 → splitguides-0.10.4}/src/splitguides/static/desktop.css +0 -0
  47. {splitguides-0.10.2 → splitguides-0.10.4}/src/splitguides/static/server.css +0 -0
  48. {splitguides-0.10.2 → splitguides-0.10.4}/src/splitguides/static/streamlistener.js +0 -0
  49. {splitguides-0.10.2 → splitguides-0.10.4}/src/splitguides/templates/desktop.html +0 -0
  50. {splitguides-0.10.2 → splitguides-0.10.4}/src/splitguides/templates/server.html +0 -0
  51. {splitguides-0.10.2 → splitguides-0.10.4}/src/splitguides/ui/__init__.py +0 -0
  52. {splitguides-0.10.2 → splitguides-0.10.4}/src/splitguides/ui/color.py +0 -0
  53. {splitguides-0.10.2 → splitguides-0.10.4}/src/splitguides/ui/hotkey_manager.py +0 -0
  54. {splitguides-0.10.2 → splitguides-0.10.4}/src/splitguides/ui/layouts/__init__.py +0 -0
  55. {splitguides-0.10.2 → splitguides-0.10.4}/src/splitguides/ui/layouts/build/__init__.py +0 -0
  56. {splitguides-0.10.2 → splitguides-0.10.4}/src/splitguides/ui/layouts/main_window.ui +0 -0
  57. {splitguides-0.10.2 → splitguides-0.10.4}/src/splitguides/ui/layouts/server_settings.ui +0 -0
  58. {splitguides-0.10.2 → splitguides-0.10.4}/src/splitguides/ui/layouts/settings.ui +0 -0
  59. {splitguides-0.10.2 → splitguides-0.10.4}/src/splitguides/ui/main.pyproject +0 -0
  60. {splitguides-0.10.2 → splitguides-0.10.4}/src/splitguides/ui/server_settings_ui.py +0 -0
  61. {splitguides-0.10.2 → splitguides-0.10.4}/src/splitguides/ui/settings_ui.py +0 -0
  62. {splitguides-0.10.2 → splitguides-0.10.4}/src/splitguides.egg-info/dependency_links.txt +0 -0
  63. {splitguides-0.10.2 → splitguides-0.10.4}/src/splitguides.egg-info/entry_points.txt +0 -0
  64. {splitguides-0.10.2 → splitguides-0.10.4}/src/splitguides.egg-info/top_level.txt +0 -0
  65. {splitguides-0.10.2 → splitguides-0.10.4}/tests/conftest.py +0 -0
  66. {splitguides-0.10.2 → splitguides-0.10.4}/tests/test_livesplit_client/test_get_client.py +0 -0
  67. {splitguides-0.10.2 → splitguides-0.10.4}/tests/test_livesplit_client/test_messaging.py +0 -0
  68. {splitguides-0.10.2 → splitguides-0.10.4}/tests/test_livesplit_client/test_networking.py +0 -0
  69. {splitguides-0.10.2 → splitguides-0.10.4}/tests/test_parser.py +0 -0
  70. {splitguides-0.10.2 → splitguides-0.10.4}/tests/test_ui/settings.json +0 -0
  71. {splitguides-0.10.2 → splitguides-0.10.4}/tests/test_ui/test_livesplit_link.py +0 -0
  72. {splitguides-0.10.2 → splitguides-0.10.4}/tests/test_ui/test_settings.py +0 -0
@@ -0,0 +1,2 @@
1
+ prune .github
2
+ prune images
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: splitguides
3
- Version: 0.10.2
3
+ Version: 0.10.4
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
@@ -13,7 +13,7 @@ Classifier: Topic :: Games/Entertainment
13
13
  Requires-Python: >=3.12
14
14
  Description-Content-Type: text/markdown
15
15
  License-File: COPYING
16
- Requires-Dist: pyside6~=6.9
16
+ Requires-Dist: pyside6~=6.9.0
17
17
  Requires-Dist: jinja2~=3.1
18
18
  Requires-Dist: bleach[css]==6.0
19
19
  Requires-Dist: flask~=3.0
@@ -21,6 +21,7 @@ Requires-Dist: markdown~=3.6
21
21
  Requires-Dist: keyboard~=0.13.5
22
22
  Requires-Dist: ducktools-classbuilder>=0.7.4
23
23
  Requires-Dist: waitress~=3.0
24
+ Requires-Dist: platformdirs~=4.3
24
25
  Dynamic: license-file
25
26
 
26
27
  # SplitGuides #
@@ -47,10 +48,12 @@ Includes a server version for rendering notes in browsers on another device
47
48
  #### UV ####
48
49
 
49
50
  If you have [uv](https://docs.astral.sh/uv/) installed you can install and run splitguides
50
- directly from the Python Package Index (PyPI).
51
+ directly from the Python Package Index (PyPI). This is the recommended method for non-windows
52
+ platforms.
51
53
 
52
54
  * Install and run the latest release with `uvx splitguides`
53
-
55
+ * Install and run the current main branch from GitHub with
56
+ `uvx --from git+https://github.com/DavidCEllis/SplitGuides splitguides`
54
57
 
55
58
  ## Usage ##
56
59
 
@@ -2,32 +2,33 @@
2
2
  requires = [
3
3
  "setuptools>=77.0",
4
4
  "setuptools-scm>=8",
5
- "pyside6-essentials~=6.9", # Needed to build uic files
5
+ "pyside6-essentials~=6.9", # Needed to build uic files
6
6
  ]
7
7
  build-backend = "setuptools.build_meta"
8
8
 
9
9
  [project]
10
- name="splitguides"
11
- description="A tool for speedrunners to display notes that advance automatically with their splits in Livesplit."
10
+ name = "splitguides"
11
+ description = "A tool for speedrunners to display notes that advance automatically with their splits in Livesplit."
12
12
  authors = [
13
- { name = "David C Ellis" },
13
+ { name = "David C Ellis" },
14
14
  ]
15
- readme="README.md"
16
- requires-python = ">=3.12" # 3.12 should function and build now
15
+ readme = "README.md"
16
+ requires-python = ">=3.12"
17
17
  dependencies = [
18
- "pyside6~=6.9",
18
+ "pyside6~=6.9.0",
19
19
  "jinja2~=3.1",
20
- "bleach[css]==6.0", # Each upgrade to bleach has broken something so pin it.
20
+ "bleach[css]==6.0", # Each upgrade to bleach has broken something so pin it.
21
21
  "flask~=3.0",
22
22
  "markdown~=3.6",
23
23
  "keyboard~=0.13.5",
24
24
  "ducktools-classbuilder>=0.7.4",
25
25
  "waitress~=3.0",
26
+ "platformdirs~=4.3",
26
27
  ]
27
28
  classifiers = [
28
29
  "Development Status :: 4 - Beta",
29
30
  "Operating System :: Microsoft :: Windows",
30
- "Operating System :: POSIX :: Linux", # Should also work on Linux, even if livesplit doesn't
31
+ "Operating System :: POSIX :: Linux",
31
32
  "Programming Language :: Python :: 3.12",
32
33
  "Programming Language :: Python :: 3.13",
33
34
  "Topic :: Games/Entertainment",
@@ -59,14 +60,7 @@ __version_tuple__ = {version_tuple}
59
60
  """
60
61
 
61
62
  [tool.pytest.ini_options]
62
- addopts= "--cov=src/ --cov-report=term-missing"
63
+ addopts = "--cov=src/ --cov-report=term-missing"
63
64
  testpaths = [
64
65
  "tests",
65
66
  ]
66
-
67
- [tool.uv]
68
- # Only x86_64 / AMD64 is supported
69
- environments = [
70
- "platform_system == 'Windows' and platform_machine == 'AMD64' and implementation_name == 'cpython'",
71
- "platform_system == 'Linux' and platform_machine == 'x86_64' and implementation_name == 'cpython'",
72
- ]
@@ -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.4"
2
+ __version_tuple__ = (0, 10, 4)
@@ -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
 
@@ -15,6 +15,8 @@ from .exceptions import UnsupportedPlatformError
15
15
  PROJECT_NAME = "splitguides"
16
16
 
17
17
  match sys.platform:
18
+ # Don't change existing win32/linux config locations
19
+ # but let platformdirs handle this for previously unsupported platforms
18
20
  case "win32":
19
21
  if _local_app_folder := os.environ.get("LOCALAPPDATA"):
20
22
  if not os.path.isdir(_local_app_folder):
@@ -27,9 +29,8 @@ match sys.platform:
27
29
  case "linux":
28
30
  SETTINGS_FOLDER = Path(os.path.expanduser(os.path.join("~", f".{PROJECT_NAME}")))
29
31
  case other:
30
- raise UnsupportedPlatformError(
31
- f"Platform {other!r} is not currently supported."
32
- )
32
+ import platformdirs
33
+ SETTINGS_FOLDER = Path(platformdirs.user_config_dir(PROJECT_NAME))
33
34
 
34
35
  SETTINGS_FOLDER.mkdir(exist_ok=True)
35
36
 
@@ -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)
@@ -3,7 +3,7 @@
3
3
  ################################################################################
4
4
  ## Form generated from reading UI file 'main_window.ui'
5
5
  ##
6
- ## Created by: Qt User Interface Compiler version 6.9.1
6
+ ## Created by: Qt User Interface Compiler version 6.10.1
7
7
  ##
8
8
  ## WARNING! All changes made in this file will be lost when recompiling UI file!
9
9
  ################################################################################
@@ -3,7 +3,7 @@
3
3
  ################################################################################
4
4
  ## Form generated from reading UI file 'server_settings.ui'
5
5
  ##
6
- ## Created by: Qt User Interface Compiler version 6.9.1
6
+ ## Created by: Qt User Interface Compiler version 6.10.1
7
7
  ##
8
8
  ## WARNING! All changes made in this file will be lost when recompiling UI file!
9
9
  ################################################################################
@@ -3,7 +3,7 @@
3
3
  ################################################################################
4
4
  ## Form generated from reading UI file 'settings.ui'
5
5
  ##
6
- ## Created by: Qt User Interface Compiler version 6.9.1
6
+ ## Created by: Qt User Interface Compiler version 6.10.1
7
7
  ##
8
8
  ## WARNING! All changes made in this file will be lost when recompiling UI file!
9
9
  ################################################################################
@@ -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.4
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
@@ -13,7 +13,7 @@ Classifier: Topic :: Games/Entertainment
13
13
  Requires-Python: >=3.12
14
14
  Description-Content-Type: text/markdown
15
15
  License-File: COPYING
16
- Requires-Dist: pyside6~=6.9
16
+ Requires-Dist: pyside6~=6.9.0
17
17
  Requires-Dist: jinja2~=3.1
18
18
  Requires-Dist: bleach[css]==6.0
19
19
  Requires-Dist: flask~=3.0
@@ -21,6 +21,7 @@ Requires-Dist: markdown~=3.6
21
21
  Requires-Dist: keyboard~=0.13.5
22
22
  Requires-Dist: ducktools-classbuilder>=0.7.4
23
23
  Requires-Dist: waitress~=3.0
24
+ Requires-Dist: platformdirs~=4.3
24
25
  Dynamic: license-file
25
26
 
26
27
  # SplitGuides #
@@ -47,10 +48,12 @@ Includes a server version for rendering notes in browsers on another device
47
48
  #### UV ####
48
49
 
49
50
  If you have [uv](https://docs.astral.sh/uv/) installed you can install and run splitguides
50
- directly from the Python Package Index (PyPI).
51
+ directly from the Python Package Index (PyPI). This is the recommended method for non-windows
52
+ platforms.
51
53
 
52
54
  * Install and run the latest release with `uvx splitguides`
53
-
55
+ * Install and run the current main branch from GitHub with
56
+ `uvx --from git+https://github.com/DavidCEllis/SplitGuides splitguides`
54
57
 
55
58
  ## Usage ##
56
59
 
@@ -7,14 +7,7 @@ pyproject.toml
7
7
  readme.md
8
8
  setup.py
9
9
  uv.lock
10
- .github/dependabot.yml
11
- .github/workflows/auto-test.yml
12
- .github/workflows/build-exe.yml
13
- .github/workflows/publish_to_pypi.yml
14
- .github/workflows/test-builds.yml
15
10
  application/setup.py
16
- images/splitguides_server_example.jpg
17
- images/splits_example.png
18
11
  scripts/clean_compiled_ui_files.py
19
12
  src/splitguides/__init__.py
20
13
  src/splitguides/__main__.py
@@ -1,4 +1,4 @@
1
- pyside6~=6.9
1
+ pyside6~=6.9.0
2
2
  jinja2~=3.1
3
3
  bleach[css]==6.0
4
4
  flask~=3.0
@@ -6,3 +6,4 @@ markdown~=3.6
6
6
  keyboard~=0.13.5
7
7
  ducktools-classbuilder>=0.7.4
8
8
  waitress~=3.0
9
+ platformdirs~=4.3
@@ -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