Splatlogger 1.2.2__tar.gz → 1.2.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 (23) hide show
  1. {splatlogger-1.2.2 → splatlogger-1.2.4}/PKG-INFO +33 -18
  2. splatlogger-1.2.2/src/Splatlogger.egg-info/PKG-INFO → splatlogger-1.2.4/README.md +25 -35
  3. {splatlogger-1.2.2 → splatlogger-1.2.4}/pyproject.toml +13 -5
  4. splatlogger-1.2.2/README.md → splatlogger-1.2.4/src/Splatlogger.egg-info/PKG-INFO +50 -14
  5. {splatlogger-1.2.2 → splatlogger-1.2.4}/src/Splatlogger.egg-info/SOURCES.txt +1 -0
  6. {splatlogger-1.2.2 → splatlogger-1.2.4}/src/Splatlogger.egg-info/requires.txt +10 -2
  7. {splatlogger-1.2.2 → splatlogger-1.2.4}/src/splatlogger/__init__.py +1 -1
  8. {splatlogger-1.2.2 → splatlogger-1.2.4}/src/splatlogger/cemu_gecko.py +5 -2
  9. {splatlogger-1.2.2 → splatlogger-1.2.4}/src/splatlogger/cli.py +7 -2
  10. splatlogger-1.2.4/src/splatlogger/errors.py +2 -0
  11. {splatlogger-1.2.2 → splatlogger-1.2.4}/src/splatlogger/splatlogger.py +13 -4
  12. {splatlogger-1.2.2 → splatlogger-1.2.4}/src/splatlogger/tuples.py +2 -3
  13. {splatlogger-1.2.2 → splatlogger-1.2.4}/src/splatlogger/utility_functions.py +1 -4
  14. {splatlogger-1.2.2 → splatlogger-1.2.4}/LICENSE +0 -0
  15. {splatlogger-1.2.2 → splatlogger-1.2.4}/setup.cfg +0 -0
  16. {splatlogger-1.2.2 → splatlogger-1.2.4}/src/Splatlogger.egg-info/dependency_links.txt +0 -0
  17. {splatlogger-1.2.2 → splatlogger-1.2.4}/src/Splatlogger.egg-info/entry_points.txt +0 -0
  18. {splatlogger-1.2.2 → splatlogger-1.2.4}/src/Splatlogger.egg-info/top_level.txt +0 -0
  19. {splatlogger-1.2.2 → splatlogger-1.2.4}/src/splatlogger/__main__.py +0 -0
  20. {splatlogger-1.2.2 → splatlogger-1.2.4}/src/splatlogger/enums.py +0 -0
  21. {splatlogger-1.2.2 → splatlogger-1.2.4}/src/splatlogger/match_logger.py +0 -0
  22. {splatlogger-1.2.2 → splatlogger-1.2.4}/src/splatlogger/resources/names.json +0 -0
  23. {splatlogger-1.2.2 → splatlogger-1.2.4}/src/splatlogger/tcpgecko.py +0 -0
@@ -1,22 +1,26 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Splatlogger
3
- Version: 1.2.2
3
+ Version: 1.2.4
4
4
  Summary: PID Grabber and player/match information logging tool for Splatoon
5
5
  Author-email: Shadow Doggo <shadowdoggo@protonmail.com>
6
6
  License-Expression: MIT
7
7
  Project-URL: Source Code, https://codeberg.org/ShadowDoggo/Splatlogger
8
8
  Classifier: Programming Language :: Python :: 3
9
9
  Classifier: Operating System :: OS Independent
10
- Requires-Python: >=3.11
10
+ Requires-Python: >=3.10
11
11
  Description-Content-Type: text/markdown
12
12
  License-File: LICENSE
13
+ Requires-Dist: tomli>=1.1.0; python_version < "3.11"
13
14
  Requires-Dist: userpaths>=0.1.3
14
15
  Requires-Dist: requests>=2.28.0
15
- Requires-Dist: psutil>=5.9.0
16
- Requires-Dist: pymemoryeditor>=2.0.0
17
16
  Requires-Dist: colorama>=0.4.6
18
17
  Requires-Dist: clean-text>=0.7.1
19
18
  Requires-Dist: prompt_toolkit>=3.0.0
19
+ Provides-Extra: cemu
20
+ Requires-Dist: psutil>=5.9.0; extra == "cemu"
21
+ Requires-Dist: pymemoryeditor>=2.0.0; extra == "cemu"
22
+ Provides-Extra: build
23
+ Requires-Dist: pyinstaller>=6.6.0; extra == "build"
20
24
  Dynamic: license-file
21
25
 
22
26
  # Splatlogger
@@ -47,13 +51,14 @@ On Aroma, use [TCPGecko-Plugin](https://github.com/PinkDiamondTeam/TCPGecko-Plug
47
51
 
48
52
  ## Usage
49
53
  ### Running the executable
50
- Windows and Linux executables are provided on the Releases page.
54
+ Windows and Linux executables are provided on the [Releases](https://codeberg.org/ShadowDoggo/Splatlogger/releases/latest) page.
51
55
 
52
56
  Run Splatlogger with:
53
57
  ```
54
- path/to/Splatlogger-executable --ip IP [options]
58
+ path/to/Splatlogger-executable --ip IP [options] / --cemu [PID] [options]
55
59
  ```
56
- where `IP` is your Wii U's LAN IP address.
60
+ Use the `--ip` target where `IP` is your Wii U's LAN IP address,
61
+ or the `-c` / `--cemu` target to enable Cemu mode where `PID` is the process ID of the Cemu process (optional, should be detected automatically).
57
62
 
58
63
  Open a command prompt/terminal window and drag the executable into it to automatically get the path.
59
64
 
@@ -65,29 +70,35 @@ You can install Splatlogger as a package from PyPI:
65
70
  pip install Splatlogger
66
71
  ```
67
72
 
68
- The run with:
73
+ To enable Cemu support, install with the `cemu` extra:
69
74
  ```
70
- splatlogger --ip IP [options]
75
+ pip install "Splatlogger[cemu]"
71
76
  ```
72
- (if that fails, try `python -m splatlogger`) where `IP` is your Wii U's LAN IP address.
77
+ (use `pip install --upgrade` to update from an older version)
73
78
 
74
- To run from source instead, download the latest source archive from the Releases
79
+ Then run with:
80
+ ```
81
+ splatlogger --ip IP [options] / --cemu [PID] [options]
82
+ ```
83
+ (if that fails, try `python -m splatlogger`)
84
+
85
+ Use the `--ip` target where `IP` is your Wii U's LAN IP address,
86
+ or the `-c` / `--cemu` target to enable Cemu mode where `PID` is the process ID of the Cemu process (optional, should be detected automatically).
87
+
88
+ To run from source instead, download the latest source archive from the [Releases](https://codeberg.org/ShadowDoggo/Splatlogger/releases/latest)
75
89
  page and extract it, then open a terminal window in the extracted directory.
76
90
 
77
91
  Install the required dependencies:
78
92
  ```
79
- pip install -r requirements.txt
93
+ pip install -r requirements.txt / cemu_requirements.txt
80
94
  ```
81
95
 
82
96
  Then move into the `src` directory and run:
83
97
  ```
84
- python -m splatlogger --ip IP [options]
98
+ python -m splatlogger --ip IP [options] / --cemu [PID] [options]
85
99
  ```
86
100
 
87
101
  ### Options
88
- - `-c [PID]`, `--cemu [PID]` - Switch to Cemu mode. The `--ip` argument is not required.
89
- - `PID` - Process ID of the Cemu process (optional).
90
-
91
102
  - `--log-level option` - Set how much data should be logged.
92
103
  - `none` - Don't create a log file.
93
104
  - `standard` - Log only basic player information, the same as what's printed to the console (default).
@@ -105,7 +116,7 @@ Also allows you to view information about the lobby/gathering while on the match
105
116
  - `all` - Save a log of all matches you play (default).
106
117
  - `latest` - Save a log of only the latest match.
107
118
 
108
- (These options don't affect anything if log level is set to `none`)
119
+ (These options don't affect anything if the log level is set to `none`)
109
120
 
110
121
  - `--stack Address (in hex)` - (Cemu only, optional) Beginning address of the stack space for Default Core 1 (Debug > View PPC threads).
111
122
  Only required for logging stats. If the default values don't work, you'll need to specify this manually.
@@ -180,7 +191,7 @@ In that case, it's best to run the package from source or use the executable ins
180
191
  ## Important notes
181
192
  - The data collected by Splatlogger is public player info shared by the game with every user you play with in online matches.
182
193
 
183
- - Network IDs and Mii names are fetched from the account server; this can be disabled with `--service none`.
194
+ - Network IDs and Mii names are fetched from the network's account server; this can be disabled with `--service none`.
184
195
 
185
196
  - Splatlogger does not collect any sensitive information such as account email addresses or IP addresses.
186
197
 
@@ -197,6 +208,10 @@ python scripts/build.py [--upx-dir path/to/upx]
197
208
  ```
198
209
  use `--upx-dir` if you're using UPX to compress the executable.
199
210
 
211
+ You can also use `build.bat` on Windows and `build.sh` on Linux to handle everything automatically.
212
+
213
+ (No builds or build script are provided for macOS as I don't have a Mac to test, and my attempts at virtualizing macOS have been unsuccessful.)
214
+
200
215
  ## Acknowledgments
201
216
  - NWPlayer123 for the reference implementation of a TCPGecko library.
202
217
 
@@ -1,24 +1,3 @@
1
- Metadata-Version: 2.4
2
- Name: Splatlogger
3
- Version: 1.2.2
4
- Summary: PID Grabber and player/match information logging tool for Splatoon
5
- Author-email: Shadow Doggo <shadowdoggo@protonmail.com>
6
- License-Expression: MIT
7
- Project-URL: Source Code, https://codeberg.org/ShadowDoggo/Splatlogger
8
- Classifier: Programming Language :: Python :: 3
9
- Classifier: Operating System :: OS Independent
10
- Requires-Python: >=3.11
11
- Description-Content-Type: text/markdown
12
- License-File: LICENSE
13
- Requires-Dist: userpaths>=0.1.3
14
- Requires-Dist: requests>=2.28.0
15
- Requires-Dist: psutil>=5.9.0
16
- Requires-Dist: pymemoryeditor>=2.0.0
17
- Requires-Dist: colorama>=0.4.6
18
- Requires-Dist: clean-text>=0.7.1
19
- Requires-Dist: prompt_toolkit>=3.0.0
20
- Dynamic: license-file
21
-
22
1
  # Splatlogger
23
2
  A PID Grabber and player/match information logging tool for Splatoon, supporting Wii U and Cemu*.
24
3
 
@@ -47,13 +26,14 @@ On Aroma, use [TCPGecko-Plugin](https://github.com/PinkDiamondTeam/TCPGecko-Plug
47
26
 
48
27
  ## Usage
49
28
  ### Running the executable
50
- Windows and Linux executables are provided on the Releases page.
29
+ Windows and Linux executables are provided on the [Releases](https://codeberg.org/ShadowDoggo/Splatlogger/releases/latest) page.
51
30
 
52
31
  Run Splatlogger with:
53
32
  ```
54
- path/to/Splatlogger-executable --ip IP [options]
33
+ path/to/Splatlogger-executable --ip IP [options] / --cemu [PID] [options]
55
34
  ```
56
- where `IP` is your Wii U's LAN IP address.
35
+ Use the `--ip` target where `IP` is your Wii U's LAN IP address,
36
+ or the `-c` / `--cemu` target to enable Cemu mode where `PID` is the process ID of the Cemu process (optional, should be detected automatically).
57
37
 
58
38
  Open a command prompt/terminal window and drag the executable into it to automatically get the path.
59
39
 
@@ -65,29 +45,35 @@ You can install Splatlogger as a package from PyPI:
65
45
  pip install Splatlogger
66
46
  ```
67
47
 
68
- The run with:
48
+ To enable Cemu support, install with the `cemu` extra:
49
+ ```
50
+ pip install "Splatlogger[cemu]"
51
+ ```
52
+ (use `pip install --upgrade` to update from an older version)
53
+
54
+ Then run with:
69
55
  ```
70
- splatlogger --ip IP [options]
56
+ splatlogger --ip IP [options] / --cemu [PID] [options]
71
57
  ```
72
- (if that fails, try `python -m splatlogger`) where `IP` is your Wii U's LAN IP address.
58
+ (if that fails, try `python -m splatlogger`)
73
59
 
74
- To run from source instead, download the latest source archive from the Releases
60
+ Use the `--ip` target where `IP` is your Wii U's LAN IP address,
61
+ or the `-c` / `--cemu` target to enable Cemu mode where `PID` is the process ID of the Cemu process (optional, should be detected automatically).
62
+
63
+ To run from source instead, download the latest source archive from the [Releases](https://codeberg.org/ShadowDoggo/Splatlogger/releases/latest)
75
64
  page and extract it, then open a terminal window in the extracted directory.
76
65
 
77
66
  Install the required dependencies:
78
67
  ```
79
- pip install -r requirements.txt
68
+ pip install -r requirements.txt / cemu_requirements.txt
80
69
  ```
81
70
 
82
71
  Then move into the `src` directory and run:
83
72
  ```
84
- python -m splatlogger --ip IP [options]
73
+ python -m splatlogger --ip IP [options] / --cemu [PID] [options]
85
74
  ```
86
75
 
87
76
  ### Options
88
- - `-c [PID]`, `--cemu [PID]` - Switch to Cemu mode. The `--ip` argument is not required.
89
- - `PID` - Process ID of the Cemu process (optional).
90
-
91
77
  - `--log-level option` - Set how much data should be logged.
92
78
  - `none` - Don't create a log file.
93
79
  - `standard` - Log only basic player information, the same as what's printed to the console (default).
@@ -105,7 +91,7 @@ Also allows you to view information about the lobby/gathering while on the match
105
91
  - `all` - Save a log of all matches you play (default).
106
92
  - `latest` - Save a log of only the latest match.
107
93
 
108
- (These options don't affect anything if log level is set to `none`)
94
+ (These options don't affect anything if the log level is set to `none`)
109
95
 
110
96
  - `--stack Address (in hex)` - (Cemu only, optional) Beginning address of the stack space for Default Core 1 (Debug > View PPC threads).
111
97
  Only required for logging stats. If the default values don't work, you'll need to specify this manually.
@@ -180,7 +166,7 @@ In that case, it's best to run the package from source or use the executable ins
180
166
  ## Important notes
181
167
  - The data collected by Splatlogger is public player info shared by the game with every user you play with in online matches.
182
168
 
183
- - Network IDs and Mii names are fetched from the account server; this can be disabled with `--service none`.
169
+ - Network IDs and Mii names are fetched from the network's account server; this can be disabled with `--service none`.
184
170
 
185
171
  - Splatlogger does not collect any sensitive information such as account email addresses or IP addresses.
186
172
 
@@ -197,6 +183,10 @@ python scripts/build.py [--upx-dir path/to/upx]
197
183
  ```
198
184
  use `--upx-dir` if you're using UPX to compress the executable.
199
185
 
186
+ You can also use `build.bat` on Windows and `build.sh` on Linux to handle everything automatically.
187
+
188
+ (No builds or build script are provided for macOS as I don't have a Mac to test, and my attempts at virtualizing macOS have been unsuccessful.)
189
+
200
190
  ## Acknowledgments
201
191
  - NWPlayer123 for the reference implementation of a TCPGecko library.
202
192
 
@@ -1,21 +1,20 @@
1
1
  [build-system]
2
- requires = ["setuptools>=83.0.0"]
2
+ requires = ["setuptools>=77.0.3"]
3
3
  build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "Splatlogger"
7
- version = "1.2.2"
7
+ version = "1.2.4"
8
8
  authors = [
9
9
  { name="Shadow Doggo", email="shadowdoggo@protonmail.com" }
10
10
  ]
11
11
  description = "PID Grabber and player/match information logging tool for Splatoon"
12
12
  readme = "README.md"
13
- requires-python = ">=3.11"
13
+ requires-python = ">=3.10"
14
14
  dependencies = [
15
+ "tomli>=1.1.0; python_version<'3.11'",
15
16
  "userpaths>=0.1.3",
16
17
  "requests>=2.28.0",
17
- "psutil>=5.9.0",
18
- "pymemoryeditor>=2.0.0",
19
18
  "colorama>=0.4.6",
20
19
  "clean-text>=0.7.1",
21
20
  "prompt_toolkit>=3.0.0"
@@ -27,6 +26,15 @@ classifiers = [
27
26
  license = "MIT"
28
27
  license-files = ["LICENSE"]
29
28
 
29
+ [project.optional-dependencies]
30
+ cemu = [
31
+ "psutil>=5.9.0",
32
+ "pymemoryeditor>=2.0.0"
33
+ ]
34
+ build = [
35
+ "pyinstaller>=6.6.0"
36
+ ]
37
+
30
38
  [project.urls]
31
39
  "Source Code" = "https://codeberg.org/ShadowDoggo/Splatlogger"
32
40
 
@@ -1,3 +1,28 @@
1
+ Metadata-Version: 2.4
2
+ Name: Splatlogger
3
+ Version: 1.2.4
4
+ Summary: PID Grabber and player/match information logging tool for Splatoon
5
+ Author-email: Shadow Doggo <shadowdoggo@protonmail.com>
6
+ License-Expression: MIT
7
+ Project-URL: Source Code, https://codeberg.org/ShadowDoggo/Splatlogger
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: Operating System :: OS Independent
10
+ Requires-Python: >=3.10
11
+ Description-Content-Type: text/markdown
12
+ License-File: LICENSE
13
+ Requires-Dist: tomli>=1.1.0; python_version < "3.11"
14
+ Requires-Dist: userpaths>=0.1.3
15
+ Requires-Dist: requests>=2.28.0
16
+ Requires-Dist: colorama>=0.4.6
17
+ Requires-Dist: clean-text>=0.7.1
18
+ Requires-Dist: prompt_toolkit>=3.0.0
19
+ Provides-Extra: cemu
20
+ Requires-Dist: psutil>=5.9.0; extra == "cemu"
21
+ Requires-Dist: pymemoryeditor>=2.0.0; extra == "cemu"
22
+ Provides-Extra: build
23
+ Requires-Dist: pyinstaller>=6.6.0; extra == "build"
24
+ Dynamic: license-file
25
+
1
26
  # Splatlogger
2
27
  A PID Grabber and player/match information logging tool for Splatoon, supporting Wii U and Cemu*.
3
28
 
@@ -26,13 +51,14 @@ On Aroma, use [TCPGecko-Plugin](https://github.com/PinkDiamondTeam/TCPGecko-Plug
26
51
 
27
52
  ## Usage
28
53
  ### Running the executable
29
- Windows and Linux executables are provided on the Releases page.
54
+ Windows and Linux executables are provided on the [Releases](https://codeberg.org/ShadowDoggo/Splatlogger/releases/latest) page.
30
55
 
31
56
  Run Splatlogger with:
32
57
  ```
33
- path/to/Splatlogger-executable --ip IP [options]
58
+ path/to/Splatlogger-executable --ip IP [options] / --cemu [PID] [options]
34
59
  ```
35
- where `IP` is your Wii U's LAN IP address.
60
+ Use the `--ip` target where `IP` is your Wii U's LAN IP address,
61
+ or the `-c` / `--cemu` target to enable Cemu mode where `PID` is the process ID of the Cemu process (optional, should be detected automatically).
36
62
 
37
63
  Open a command prompt/terminal window and drag the executable into it to automatically get the path.
38
64
 
@@ -44,29 +70,35 @@ You can install Splatlogger as a package from PyPI:
44
70
  pip install Splatlogger
45
71
  ```
46
72
 
47
- The run with:
73
+ To enable Cemu support, install with the `cemu` extra:
74
+ ```
75
+ pip install "Splatlogger[cemu]"
76
+ ```
77
+ (use `pip install --upgrade` to update from an older version)
78
+
79
+ Then run with:
48
80
  ```
49
- splatlogger --ip IP [options]
81
+ splatlogger --ip IP [options] / --cemu [PID] [options]
50
82
  ```
51
- (if that fails, try `python -m splatlogger`) where `IP` is your Wii U's LAN IP address.
83
+ (if that fails, try `python -m splatlogger`)
52
84
 
53
- To run from source instead, download the latest source archive from the Releases
85
+ Use the `--ip` target where `IP` is your Wii U's LAN IP address,
86
+ or the `-c` / `--cemu` target to enable Cemu mode where `PID` is the process ID of the Cemu process (optional, should be detected automatically).
87
+
88
+ To run from source instead, download the latest source archive from the [Releases](https://codeberg.org/ShadowDoggo/Splatlogger/releases/latest)
54
89
  page and extract it, then open a terminal window in the extracted directory.
55
90
 
56
91
  Install the required dependencies:
57
92
  ```
58
- pip install -r requirements.txt
93
+ pip install -r requirements.txt / cemu_requirements.txt
59
94
  ```
60
95
 
61
96
  Then move into the `src` directory and run:
62
97
  ```
63
- python -m splatlogger --ip IP [options]
98
+ python -m splatlogger --ip IP [options] / --cemu [PID] [options]
64
99
  ```
65
100
 
66
101
  ### Options
67
- - `-c [PID]`, `--cemu [PID]` - Switch to Cemu mode. The `--ip` argument is not required.
68
- - `PID` - Process ID of the Cemu process (optional).
69
-
70
102
  - `--log-level option` - Set how much data should be logged.
71
103
  - `none` - Don't create a log file.
72
104
  - `standard` - Log only basic player information, the same as what's printed to the console (default).
@@ -84,7 +116,7 @@ Also allows you to view information about the lobby/gathering while on the match
84
116
  - `all` - Save a log of all matches you play (default).
85
117
  - `latest` - Save a log of only the latest match.
86
118
 
87
- (These options don't affect anything if log level is set to `none`)
119
+ (These options don't affect anything if the log level is set to `none`)
88
120
 
89
121
  - `--stack Address (in hex)` - (Cemu only, optional) Beginning address of the stack space for Default Core 1 (Debug > View PPC threads).
90
122
  Only required for logging stats. If the default values don't work, you'll need to specify this manually.
@@ -159,7 +191,7 @@ In that case, it's best to run the package from source or use the executable ins
159
191
  ## Important notes
160
192
  - The data collected by Splatlogger is public player info shared by the game with every user you play with in online matches.
161
193
 
162
- - Network IDs and Mii names are fetched from the account server; this can be disabled with `--service none`.
194
+ - Network IDs and Mii names are fetched from the network's account server; this can be disabled with `--service none`.
163
195
 
164
196
  - Splatlogger does not collect any sensitive information such as account email addresses or IP addresses.
165
197
 
@@ -176,6 +208,10 @@ python scripts/build.py [--upx-dir path/to/upx]
176
208
  ```
177
209
  use `--upx-dir` if you're using UPX to compress the executable.
178
210
 
211
+ You can also use `build.bat` on Windows and `build.sh` on Linux to handle everything automatically.
212
+
213
+ (No builds or build script are provided for macOS as I don't have a Mac to test, and my attempts at virtualizing macOS have been unsuccessful.)
214
+
179
215
  ## Acknowledgments
180
216
  - NWPlayer123 for the reference implementation of a TCPGecko library.
181
217
 
@@ -12,6 +12,7 @@ src/splatlogger/__main__.py
12
12
  src/splatlogger/cemu_gecko.py
13
13
  src/splatlogger/cli.py
14
14
  src/splatlogger/enums.py
15
+ src/splatlogger/errors.py
15
16
  src/splatlogger/match_logger.py
16
17
  src/splatlogger/splatlogger.py
17
18
  src/splatlogger/tcpgecko.py
@@ -1,7 +1,15 @@
1
1
  userpaths>=0.1.3
2
2
  requests>=2.28.0
3
- psutil>=5.9.0
4
- pymemoryeditor>=2.0.0
5
3
  colorama>=0.4.6
6
4
  clean-text>=0.7.1
7
5
  prompt_toolkit>=3.0.0
6
+
7
+ [:python_version < "3.11"]
8
+ tomli>=1.1.0
9
+
10
+ [build]
11
+ pyinstaller>=6.6.0
12
+
13
+ [cemu]
14
+ psutil>=5.9.0
15
+ pymemoryeditor>=2.0.0
@@ -1,2 +1,2 @@
1
- __version__ = "1.2.2"
1
+ __version__ = "1.2.4"
2
2
  __author__ = "Shadow Doggo"
@@ -6,8 +6,11 @@ import struct
6
6
  from types import TracebackType
7
7
  from typing import Type
8
8
 
9
- import psutil
10
- from PyMemoryEditor import OpenProcess, ProcessIDNotExistsError # type: ignore[import-untyped]
9
+ try:
10
+ import psutil
11
+ from PyMemoryEditor import OpenProcess, ProcessIDNotExistsError # type: ignore[import-untyped]
12
+ except ImportError as ex:
13
+ raise ImportError("psutil and PyMemoryEditor must be installed to use Cemu mode.") from ex
11
14
 
12
15
 
13
16
  class CemuGecko:
@@ -3,7 +3,6 @@
3
3
  import argparse
4
4
  import platform
5
5
  import sys
6
- import tomllib
7
6
  import webbrowser
8
7
  from pathlib import Path
9
8
 
@@ -13,9 +12,15 @@ from prompt_toolkit import PromptSession
13
12
  from prompt_toolkit.patch_stdout import patch_stdout
14
13
 
15
14
  from . import utility_functions as uf, __version__
16
- from .splatlogger import SplatloggerError, command_lobby_info, main
15
+ from .errors import SplatloggerError
16
+ from .splatlogger import command_lobby_info, main
17
17
  from .tuples import AppContext, Options
18
18
 
19
+ if sys.version_info >= (3, 11):
20
+ import tomllib
21
+ else:
22
+ import tomli as tomllib
23
+
19
24
 
20
25
  def cli() -> None:
21
26
  if platform.system() == "Windows":
@@ -0,0 +1,2 @@
1
+ class SplatloggerError(Exception):
2
+ pass
@@ -1,5 +1,7 @@
1
1
  # Splatlogger (c) 2025 Shadow Doggo.
2
2
 
3
+ from __future__ import annotations
4
+
3
5
  import binascii
4
6
  import ipaddress
5
7
  import logging
@@ -8,18 +10,20 @@ import time
8
10
  from base64 import b64decode
9
11
  from contextlib import contextmanager
10
12
  from datetime import datetime
11
- from typing import Callable, Iterator
13
+ from typing import Callable, Iterator, TYPE_CHECKING
12
14
 
13
15
  import requests
14
16
  import userpaths # type: ignore[import-untyped]
15
17
 
16
18
  from . import utility_functions as uf
17
- from .cemu_gecko import CemuGecko, CemuGeckoError
18
19
  from .enums import Offsets, Pointers
19
20
  from .match_logger import MatchLogger
20
21
  from .tcpgecko import GeckoConnectionFailedError, TCPGecko
21
22
  from .tuples import AccountInfo, AppContext, CommonAddresses, Options, PlayerInfo
22
- from .utility_functions import SplatloggerError
23
+ from .errors import SplatloggerError
24
+
25
+ if TYPE_CHECKING:
26
+ from .cemu_gecko import CemuGecko
23
27
 
24
28
  # Hack to remove the unidecode warning from clean-text
25
29
  logging.disable(logging.CRITICAL)
@@ -97,7 +101,7 @@ def command_lobby_info(ctx: AppContext) -> bool:
97
101
  f"\n{'PID':<10} | {'ANID' if ctx.options.service == 'altendo' else 'PNID':<16}\n{'-' * 30}"
98
102
  )
99
103
  for player in players:
100
- print(f"{player[0]} | {player[1]}")
104
+ print(f"{player[0]:<10} | {player[1]}")
101
105
  else:
102
106
  print("\nNo active session.")
103
107
  finally:
@@ -123,6 +127,11 @@ def create_match_logger_instance(ctx: AppContext) -> MatchLogger | None:
123
127
 
124
128
  def create_tcpgecko_instance(options: Options) -> TCPGecko | CemuGecko:
125
129
  if options.platform == "cemu":
130
+ try:
131
+ from .cemu_gecko import CemuGecko, CemuGeckoError
132
+ except ImportError as e:
133
+ raise SplatloggerError(str(e)) from e
134
+
126
135
  try:
127
136
  print("Opening Cemu process...")
128
137
  return CemuGecko(options.cemu_pid)
@@ -6,11 +6,10 @@ import threading
6
6
  from dataclasses import dataclass, field
7
7
  from typing import NamedTuple, TYPE_CHECKING
8
8
 
9
- from .cemu_gecko import CemuGecko
10
- from .tcpgecko import TCPGecko
11
-
12
9
  if TYPE_CHECKING:
13
10
  from prompt_toolkit import PromptSession
11
+ from .cemu_gecko import CemuGecko
12
+ from .tcpgecko import TCPGecko
14
13
 
15
14
 
16
15
  class Options(NamedTuple):
@@ -14,6 +14,7 @@ import requests
14
14
  from colorama import Fore, Style
15
15
 
16
16
  from .enums import Offsets
17
+ from .errors import SplatloggerError
17
18
  from .tcpgecko import GeckoConnectionClosedError, GeckoReadMemError, TCPGeckoError
18
19
  from .tuples import AccountInfo, PlayerInfo
19
20
 
@@ -139,7 +140,3 @@ def get_utc_offset(date: datetime) -> int:
139
140
  return 0
140
141
 
141
142
  return round(offset.total_seconds() / 3600)
142
-
143
-
144
- class SplatloggerError(Exception):
145
- pass
File without changes
File without changes