Splatlogger 1.2.1__tar.gz → 1.2.2__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.
- {splatlogger-1.2.1/src/Splatlogger.egg-info → splatlogger-1.2.2}/PKG-INFO +18 -31
- {splatlogger-1.2.1 → splatlogger-1.2.2}/README.md +11 -24
- {splatlogger-1.2.1 → splatlogger-1.2.2}/pyproject.toml +7 -7
- {splatlogger-1.2.1 → splatlogger-1.2.2/src/Splatlogger.egg-info}/PKG-INFO +18 -31
- splatlogger-1.2.2/src/Splatlogger.egg-info/requires.txt +7 -0
- splatlogger-1.2.2/src/splatlogger/__init__.py +2 -0
- splatlogger-1.2.2/src/splatlogger/__main__.py +8 -0
- {splatlogger-1.2.1 → splatlogger-1.2.2}/src/splatlogger/cli.py +4 -6
- {splatlogger-1.2.1 → splatlogger-1.2.2}/src/splatlogger/match_logger.py +12 -6
- {splatlogger-1.2.1 → splatlogger-1.2.2}/src/splatlogger/splatlogger.py +8 -8
- {splatlogger-1.2.1 → splatlogger-1.2.2}/src/splatlogger/utility_functions.py +4 -4
- splatlogger-1.2.1/src/Splatlogger.egg-info/requires.txt +0 -7
- splatlogger-1.2.1/src/splatlogger/__init__.py +0 -0
- splatlogger-1.2.1/src/splatlogger/__main__.py +0 -4
- {splatlogger-1.2.1 → splatlogger-1.2.2}/LICENSE +0 -0
- {splatlogger-1.2.1 → splatlogger-1.2.2}/setup.cfg +0 -0
- {splatlogger-1.2.1 → splatlogger-1.2.2}/src/Splatlogger.egg-info/SOURCES.txt +0 -0
- {splatlogger-1.2.1 → splatlogger-1.2.2}/src/Splatlogger.egg-info/dependency_links.txt +0 -0
- {splatlogger-1.2.1 → splatlogger-1.2.2}/src/Splatlogger.egg-info/entry_points.txt +0 -0
- {splatlogger-1.2.1 → splatlogger-1.2.2}/src/Splatlogger.egg-info/top_level.txt +0 -0
- {splatlogger-1.2.1 → splatlogger-1.2.2}/src/splatlogger/cemu_gecko.py +0 -0
- {splatlogger-1.2.1 → splatlogger-1.2.2}/src/splatlogger/enums.py +0 -0
- {splatlogger-1.2.1 → splatlogger-1.2.2}/src/splatlogger/resources/names.json +0 -0
- {splatlogger-1.2.1 → splatlogger-1.2.2}/src/splatlogger/tcpgecko.py +0 -0
- {splatlogger-1.2.1 → splatlogger-1.2.2}/src/splatlogger/tuples.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: Splatlogger
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.2
|
|
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
|
|
@@ -10,13 +10,13 @@ Classifier: Operating System :: OS Independent
|
|
|
10
10
|
Requires-Python: >=3.11
|
|
11
11
|
Description-Content-Type: text/markdown
|
|
12
12
|
License-File: LICENSE
|
|
13
|
-
Requires-Dist: userpaths
|
|
14
|
-
Requires-Dist: requests
|
|
15
|
-
Requires-Dist: psutil
|
|
13
|
+
Requires-Dist: userpaths>=0.1.3
|
|
14
|
+
Requires-Dist: requests>=2.28.0
|
|
15
|
+
Requires-Dist: psutil>=5.9.0
|
|
16
16
|
Requires-Dist: pymemoryeditor>=2.0.0
|
|
17
|
-
Requires-Dist: colorama
|
|
18
|
-
Requires-Dist: clean-text
|
|
19
|
-
Requires-Dist: prompt_toolkit
|
|
17
|
+
Requires-Dist: colorama>=0.4.6
|
|
18
|
+
Requires-Dist: clean-text>=0.7.1
|
|
19
|
+
Requires-Dist: prompt_toolkit>=3.0.0
|
|
20
20
|
Dynamic: license-file
|
|
21
21
|
|
|
22
22
|
# Splatlogger
|
|
@@ -57,6 +57,8 @@ where `IP` is your Wii U's LAN IP address.
|
|
|
57
57
|
|
|
58
58
|
Open a command prompt/terminal window and drag the executable into it to automatically get the path.
|
|
59
59
|
|
|
60
|
+
On Linux, you might need to make the file executable first with `chmod +x path/to/Splatlogger-executable`
|
|
61
|
+
|
|
60
62
|
### Running with Python
|
|
61
63
|
You can install Splatlogger as a package from PyPI:
|
|
62
64
|
```
|
|
@@ -90,15 +92,15 @@ python -m splatlogger --ip IP [options]
|
|
|
90
92
|
- `none` - Don't create a log file.
|
|
91
93
|
- `standard` - Log only basic player information, the same as what's printed to the console (default).
|
|
92
94
|
- `extended` - Log all player information and additional match information.
|
|
93
|
-
- `stats` - Same as above with the addition of player stats (points, K/D, win/lose) and disconnect detection.
|
|
95
|
+
- `stats` - Same as above with the addition of player stats (points, K/D, win/lose) and disconnect detection.
|
|
94
96
|
Requires the match to end to finish logging; if it ends abruptly, the stats won't be logged.
|
|
95
97
|
|
|
96
98
|
- `--service` - Choose which network service you're using.
|
|
97
99
|
- `none` - Disable fetching account info.
|
|
98
100
|
- `pretendo` - Pretendo Network (default).
|
|
99
|
-
- `
|
|
101
|
+
- `altendo` - Altendo Network.
|
|
100
102
|
|
|
101
|
-
- `-a [option]`, `--auto [option]` - Enable auto logging. When enabled will automatically log every match you play.
|
|
103
|
+
- `-a [option]`, `--auto [option]` - Enable auto logging. When enabled will automatically log every match you play.
|
|
102
104
|
Also allows you to view information about the lobby/gathering while on the matching screen.
|
|
103
105
|
- `all` - Save a log of all matches you play (default).
|
|
104
106
|
- `latest` - Save a log of only the latest match.
|
|
@@ -134,7 +136,7 @@ Example `config.toml`:
|
|
|
134
136
|
# Target Wii U LAN IP address (omit if using Cemu)
|
|
135
137
|
ip = "192.168.1.50"
|
|
136
138
|
|
|
137
|
-
# Target network service: "pretendo", "
|
|
139
|
+
# Target network service: "pretendo", "altendo", or "none"
|
|
138
140
|
service = "pretendo"
|
|
139
141
|
|
|
140
142
|
# Log level: "standard", "extended", "stats", or "none"
|
|
@@ -178,7 +180,7 @@ In that case, it's best to run the package from source or use the executable ins
|
|
|
178
180
|
## Important notes
|
|
179
181
|
- The data collected by Splatlogger is public player info shared by the game with every user you play with in online matches.
|
|
180
182
|
|
|
181
|
-
- Network IDs and Mii names are fetched from the
|
|
183
|
+
- Network IDs and Mii names are fetched from the account server; this can be disabled with `--service none`.
|
|
182
184
|
|
|
183
185
|
- Splatlogger does not collect any sensitive information such as account email addresses or IP addresses.
|
|
184
186
|
|
|
@@ -187,28 +189,13 @@ In that case, it's best to run the package from source or use the executable ins
|
|
|
187
189
|
- Please handle the logs responsibly. I do not encourage sharing other users' data without their permission, even if no real harm can be done with it.
|
|
188
190
|
|
|
189
191
|
## Building the executable with PyInstaller
|
|
190
|
-
Set up a virtual environment and install PyInstaller as well as the required dependencies.
|
|
191
|
-
|
|
192
|
-
In `match_logger.py`, replace `from importlib import resources` with `import sys` and
|
|
193
|
-
```py
|
|
194
|
-
names_path = resources.files(__package__).joinpath("resources", "names.json")
|
|
195
|
-
```
|
|
192
|
+
Set up a virtual environment and run `pip install -r build_requirements.txt` to install PyInstaller as well as the required dependencies.
|
|
196
193
|
|
|
197
|
-
|
|
198
|
-
```py
|
|
199
|
-
names_path = Path(sys._MEIPASS) / "resources/names.json"
|
|
194
|
+
Run:
|
|
200
195
|
```
|
|
201
|
-
|
|
202
|
-
Then run:
|
|
196
|
+
python scripts/build.py [--upx-dir path/to/upx]
|
|
203
197
|
```
|
|
204
|
-
|
|
205
|
-
```
|
|
206
|
-
replacing the placeholder paths with the actual ones.
|
|
207
|
-
|
|
208
|
-
You can omit `--upx-dir` if you're not using UPX to compress the executable and `--optimize "2"` to disable
|
|
209
|
-
bytecode optimization.
|
|
210
|
-
|
|
211
|
-
On Linux, add `--bootloader-ignore-signals` and remove `--upx-dir` and `--icon` as they are not supported.
|
|
198
|
+
use `--upx-dir` if you're using UPX to compress the executable.
|
|
212
199
|
|
|
213
200
|
## Acknowledgments
|
|
214
201
|
- NWPlayer123 for the reference implementation of a TCPGecko library.
|
|
@@ -36,6 +36,8 @@ where `IP` is your Wii U's LAN IP address.
|
|
|
36
36
|
|
|
37
37
|
Open a command prompt/terminal window and drag the executable into it to automatically get the path.
|
|
38
38
|
|
|
39
|
+
On Linux, you might need to make the file executable first with `chmod +x path/to/Splatlogger-executable`
|
|
40
|
+
|
|
39
41
|
### Running with Python
|
|
40
42
|
You can install Splatlogger as a package from PyPI:
|
|
41
43
|
```
|
|
@@ -69,15 +71,15 @@ python -m splatlogger --ip IP [options]
|
|
|
69
71
|
- `none` - Don't create a log file.
|
|
70
72
|
- `standard` - Log only basic player information, the same as what's printed to the console (default).
|
|
71
73
|
- `extended` - Log all player information and additional match information.
|
|
72
|
-
- `stats` - Same as above with the addition of player stats (points, K/D, win/lose) and disconnect detection.
|
|
74
|
+
- `stats` - Same as above with the addition of player stats (points, K/D, win/lose) and disconnect detection.
|
|
73
75
|
Requires the match to end to finish logging; if it ends abruptly, the stats won't be logged.
|
|
74
76
|
|
|
75
77
|
- `--service` - Choose which network service you're using.
|
|
76
78
|
- `none` - Disable fetching account info.
|
|
77
79
|
- `pretendo` - Pretendo Network (default).
|
|
78
|
-
- `
|
|
80
|
+
- `altendo` - Altendo Network.
|
|
79
81
|
|
|
80
|
-
- `-a [option]`, `--auto [option]` - Enable auto logging. When enabled will automatically log every match you play.
|
|
82
|
+
- `-a [option]`, `--auto [option]` - Enable auto logging. When enabled will automatically log every match you play.
|
|
81
83
|
Also allows you to view information about the lobby/gathering while on the matching screen.
|
|
82
84
|
- `all` - Save a log of all matches you play (default).
|
|
83
85
|
- `latest` - Save a log of only the latest match.
|
|
@@ -113,7 +115,7 @@ Example `config.toml`:
|
|
|
113
115
|
# Target Wii U LAN IP address (omit if using Cemu)
|
|
114
116
|
ip = "192.168.1.50"
|
|
115
117
|
|
|
116
|
-
# Target network service: "pretendo", "
|
|
118
|
+
# Target network service: "pretendo", "altendo", or "none"
|
|
117
119
|
service = "pretendo"
|
|
118
120
|
|
|
119
121
|
# Log level: "standard", "extended", "stats", or "none"
|
|
@@ -157,7 +159,7 @@ In that case, it's best to run the package from source or use the executable ins
|
|
|
157
159
|
## Important notes
|
|
158
160
|
- The data collected by Splatlogger is public player info shared by the game with every user you play with in online matches.
|
|
159
161
|
|
|
160
|
-
- Network IDs and Mii names are fetched from the
|
|
162
|
+
- Network IDs and Mii names are fetched from the account server; this can be disabled with `--service none`.
|
|
161
163
|
|
|
162
164
|
- Splatlogger does not collect any sensitive information such as account email addresses or IP addresses.
|
|
163
165
|
|
|
@@ -166,28 +168,13 @@ In that case, it's best to run the package from source or use the executable ins
|
|
|
166
168
|
- Please handle the logs responsibly. I do not encourage sharing other users' data without their permission, even if no real harm can be done with it.
|
|
167
169
|
|
|
168
170
|
## Building the executable with PyInstaller
|
|
169
|
-
Set up a virtual environment and install PyInstaller as well as the required dependencies.
|
|
170
|
-
|
|
171
|
-
In `match_logger.py`, replace `from importlib import resources` with `import sys` and
|
|
172
|
-
```py
|
|
173
|
-
names_path = resources.files(__package__).joinpath("resources", "names.json")
|
|
174
|
-
```
|
|
171
|
+
Set up a virtual environment and run `pip install -r build_requirements.txt` to install PyInstaller as well as the required dependencies.
|
|
175
172
|
|
|
176
|
-
|
|
177
|
-
```py
|
|
178
|
-
names_path = Path(sys._MEIPASS) / "resources/names.json"
|
|
173
|
+
Run:
|
|
179
174
|
```
|
|
180
|
-
|
|
181
|
-
Then run:
|
|
175
|
+
python scripts/build.py [--upx-dir path/to/upx]
|
|
182
176
|
```
|
|
183
|
-
|
|
184
|
-
```
|
|
185
|
-
replacing the placeholder paths with the actual ones.
|
|
186
|
-
|
|
187
|
-
You can omit `--upx-dir` if you're not using UPX to compress the executable and `--optimize "2"` to disable
|
|
188
|
-
bytecode optimization.
|
|
189
|
-
|
|
190
|
-
On Linux, add `--bootloader-ignore-signals` and remove `--upx-dir` and `--icon` as they are not supported.
|
|
177
|
+
use `--upx-dir` if you're using UPX to compress the executable.
|
|
191
178
|
|
|
192
179
|
## Acknowledgments
|
|
193
180
|
- NWPlayer123 for the reference implementation of a TCPGecko library.
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "Splatlogger"
|
|
7
|
-
version = "1.2.
|
|
7
|
+
version = "1.2.2"
|
|
8
8
|
authors = [
|
|
9
9
|
{ name="Shadow Doggo", email="shadowdoggo@protonmail.com" }
|
|
10
10
|
]
|
|
@@ -12,13 +12,13 @@ description = "PID Grabber and player/match information logging tool for Splatoo
|
|
|
12
12
|
readme = "README.md"
|
|
13
13
|
requires-python = ">=3.11"
|
|
14
14
|
dependencies = [
|
|
15
|
-
"userpaths",
|
|
16
|
-
"requests",
|
|
17
|
-
"psutil",
|
|
15
|
+
"userpaths>=0.1.3",
|
|
16
|
+
"requests>=2.28.0",
|
|
17
|
+
"psutil>=5.9.0",
|
|
18
18
|
"pymemoryeditor>=2.0.0",
|
|
19
|
-
"colorama",
|
|
20
|
-
"clean-text",
|
|
21
|
-
"prompt_toolkit"
|
|
19
|
+
"colorama>=0.4.6",
|
|
20
|
+
"clean-text>=0.7.1",
|
|
21
|
+
"prompt_toolkit>=3.0.0"
|
|
22
22
|
]
|
|
23
23
|
classifiers = [
|
|
24
24
|
"Programming Language :: Python :: 3",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: Splatlogger
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.2
|
|
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
|
|
@@ -10,13 +10,13 @@ Classifier: Operating System :: OS Independent
|
|
|
10
10
|
Requires-Python: >=3.11
|
|
11
11
|
Description-Content-Type: text/markdown
|
|
12
12
|
License-File: LICENSE
|
|
13
|
-
Requires-Dist: userpaths
|
|
14
|
-
Requires-Dist: requests
|
|
15
|
-
Requires-Dist: psutil
|
|
13
|
+
Requires-Dist: userpaths>=0.1.3
|
|
14
|
+
Requires-Dist: requests>=2.28.0
|
|
15
|
+
Requires-Dist: psutil>=5.9.0
|
|
16
16
|
Requires-Dist: pymemoryeditor>=2.0.0
|
|
17
|
-
Requires-Dist: colorama
|
|
18
|
-
Requires-Dist: clean-text
|
|
19
|
-
Requires-Dist: prompt_toolkit
|
|
17
|
+
Requires-Dist: colorama>=0.4.6
|
|
18
|
+
Requires-Dist: clean-text>=0.7.1
|
|
19
|
+
Requires-Dist: prompt_toolkit>=3.0.0
|
|
20
20
|
Dynamic: license-file
|
|
21
21
|
|
|
22
22
|
# Splatlogger
|
|
@@ -57,6 +57,8 @@ where `IP` is your Wii U's LAN IP address.
|
|
|
57
57
|
|
|
58
58
|
Open a command prompt/terminal window and drag the executable into it to automatically get the path.
|
|
59
59
|
|
|
60
|
+
On Linux, you might need to make the file executable first with `chmod +x path/to/Splatlogger-executable`
|
|
61
|
+
|
|
60
62
|
### Running with Python
|
|
61
63
|
You can install Splatlogger as a package from PyPI:
|
|
62
64
|
```
|
|
@@ -90,15 +92,15 @@ python -m splatlogger --ip IP [options]
|
|
|
90
92
|
- `none` - Don't create a log file.
|
|
91
93
|
- `standard` - Log only basic player information, the same as what's printed to the console (default).
|
|
92
94
|
- `extended` - Log all player information and additional match information.
|
|
93
|
-
- `stats` - Same as above with the addition of player stats (points, K/D, win/lose) and disconnect detection.
|
|
95
|
+
- `stats` - Same as above with the addition of player stats (points, K/D, win/lose) and disconnect detection.
|
|
94
96
|
Requires the match to end to finish logging; if it ends abruptly, the stats won't be logged.
|
|
95
97
|
|
|
96
98
|
- `--service` - Choose which network service you're using.
|
|
97
99
|
- `none` - Disable fetching account info.
|
|
98
100
|
- `pretendo` - Pretendo Network (default).
|
|
99
|
-
- `
|
|
101
|
+
- `altendo` - Altendo Network.
|
|
100
102
|
|
|
101
|
-
- `-a [option]`, `--auto [option]` - Enable auto logging. When enabled will automatically log every match you play.
|
|
103
|
+
- `-a [option]`, `--auto [option]` - Enable auto logging. When enabled will automatically log every match you play.
|
|
102
104
|
Also allows you to view information about the lobby/gathering while on the matching screen.
|
|
103
105
|
- `all` - Save a log of all matches you play (default).
|
|
104
106
|
- `latest` - Save a log of only the latest match.
|
|
@@ -134,7 +136,7 @@ Example `config.toml`:
|
|
|
134
136
|
# Target Wii U LAN IP address (omit if using Cemu)
|
|
135
137
|
ip = "192.168.1.50"
|
|
136
138
|
|
|
137
|
-
# Target network service: "pretendo", "
|
|
139
|
+
# Target network service: "pretendo", "altendo", or "none"
|
|
138
140
|
service = "pretendo"
|
|
139
141
|
|
|
140
142
|
# Log level: "standard", "extended", "stats", or "none"
|
|
@@ -178,7 +180,7 @@ In that case, it's best to run the package from source or use the executable ins
|
|
|
178
180
|
## Important notes
|
|
179
181
|
- The data collected by Splatlogger is public player info shared by the game with every user you play with in online matches.
|
|
180
182
|
|
|
181
|
-
- Network IDs and Mii names are fetched from the
|
|
183
|
+
- Network IDs and Mii names are fetched from the account server; this can be disabled with `--service none`.
|
|
182
184
|
|
|
183
185
|
- Splatlogger does not collect any sensitive information such as account email addresses or IP addresses.
|
|
184
186
|
|
|
@@ -187,28 +189,13 @@ In that case, it's best to run the package from source or use the executable ins
|
|
|
187
189
|
- Please handle the logs responsibly. I do not encourage sharing other users' data without their permission, even if no real harm can be done with it.
|
|
188
190
|
|
|
189
191
|
## Building the executable with PyInstaller
|
|
190
|
-
Set up a virtual environment and install PyInstaller as well as the required dependencies.
|
|
191
|
-
|
|
192
|
-
In `match_logger.py`, replace `from importlib import resources` with `import sys` and
|
|
193
|
-
```py
|
|
194
|
-
names_path = resources.files(__package__).joinpath("resources", "names.json")
|
|
195
|
-
```
|
|
192
|
+
Set up a virtual environment and run `pip install -r build_requirements.txt` to install PyInstaller as well as the required dependencies.
|
|
196
193
|
|
|
197
|
-
|
|
198
|
-
```py
|
|
199
|
-
names_path = Path(sys._MEIPASS) / "resources/names.json"
|
|
194
|
+
Run:
|
|
200
195
|
```
|
|
201
|
-
|
|
202
|
-
Then run:
|
|
196
|
+
python scripts/build.py [--upx-dir path/to/upx]
|
|
203
197
|
```
|
|
204
|
-
|
|
205
|
-
```
|
|
206
|
-
replacing the placeholder paths with the actual ones.
|
|
207
|
-
|
|
208
|
-
You can omit `--upx-dir` if you're not using UPX to compress the executable and `--optimize "2"` to disable
|
|
209
|
-
bytecode optimization.
|
|
210
|
-
|
|
211
|
-
On Linux, add `--bootloader-ignore-signals` and remove `--upx-dir` and `--icon` as they are not supported.
|
|
198
|
+
use `--upx-dir` if you're using UPX to compress the executable.
|
|
212
199
|
|
|
213
200
|
## Acknowledgments
|
|
214
201
|
- NWPlayer123 for the reference implementation of a TCPGecko library.
|
|
@@ -12,18 +12,16 @@ from colorama import Fore, Style, just_fix_windows_console
|
|
|
12
12
|
from prompt_toolkit import PromptSession
|
|
13
13
|
from prompt_toolkit.patch_stdout import patch_stdout
|
|
14
14
|
|
|
15
|
-
from . import utility_functions as uf
|
|
15
|
+
from . import utility_functions as uf, __version__
|
|
16
16
|
from .splatlogger import SplatloggerError, command_lobby_info, main
|
|
17
17
|
from .tuples import AppContext, Options
|
|
18
18
|
|
|
19
|
-
VERSION = "1.2.1"
|
|
20
|
-
|
|
21
19
|
|
|
22
20
|
def cli() -> None:
|
|
23
21
|
if platform.system() == "Windows":
|
|
24
22
|
just_fix_windows_console()
|
|
25
23
|
|
|
26
|
-
print(f"Splatlogger v{
|
|
24
|
+
print(f"Splatlogger v{__version__} by Shadow Doggo\n")
|
|
27
25
|
|
|
28
26
|
try:
|
|
29
27
|
options = parse_args()
|
|
@@ -112,7 +110,7 @@ def add_parser_arguments(parser: argparse.ArgumentParser) -> None:
|
|
|
112
110
|
parser.add_argument("--log-level", help="Set how much data should be logged (see README).",
|
|
113
111
|
choices=["none", "standard", "extended", "stats"], default="standard")
|
|
114
112
|
parser.add_argument("--service", help="Choose which network service you're using (Pretendo by default).",
|
|
115
|
-
choices=["none", "pretendo", "
|
|
113
|
+
choices=["none", "pretendo", "altendo"], default="pretendo")
|
|
116
114
|
parser.add_argument("-a", "--auto",
|
|
117
115
|
help="Enable auto logging (see README).",
|
|
118
116
|
choices=["all", "latest"], nargs="?", const="all")
|
|
@@ -130,7 +128,7 @@ CONFIG_TEMPLATE = """# Splatlogger Configuration
|
|
|
130
128
|
# Target Wii U LAN IP address (omit if using Cemu)
|
|
131
129
|
# ip = "192.168.1.50"
|
|
132
130
|
|
|
133
|
-
# Target network service: "pretendo", "
|
|
131
|
+
# Target network service: "pretendo", "altendo", or "none"
|
|
134
132
|
# service = "pretendo"
|
|
135
133
|
|
|
136
134
|
# Log level: "standard", "extended", "stats", or "none"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import json
|
|
4
4
|
import platform
|
|
5
|
-
|
|
5
|
+
import sys
|
|
6
6
|
import time
|
|
7
7
|
from datetime import datetime
|
|
8
8
|
from importlib import resources
|
|
@@ -16,6 +16,13 @@ from .enums import Addresses, Offsets, Pointers, VSMode, VSRule
|
|
|
16
16
|
from .tuples import AccountInfo, AppContext, CommonAddresses, PlayerInfo
|
|
17
17
|
|
|
18
18
|
|
|
19
|
+
def get_resource_path(relative_path: str | Path) -> Path:
|
|
20
|
+
if getattr(sys, "frozen", False) and hasattr(sys, "_MEIPASS"):
|
|
21
|
+
return Path(sys._MEIPASS) / relative_path
|
|
22
|
+
|
|
23
|
+
return Path(str(resources.files(__package__).joinpath(str(relative_path))))
|
|
24
|
+
|
|
25
|
+
|
|
19
26
|
class MatchLogger:
|
|
20
27
|
"""Provides the match logging functionality of Splatlogger."""
|
|
21
28
|
|
|
@@ -24,8 +31,7 @@ class MatchLogger:
|
|
|
24
31
|
self._ctx = ctx
|
|
25
32
|
self._stats_offset: int | None = None
|
|
26
33
|
self._align = 2 if ctx.options.auto_logging or ctx.options.single_log else 0
|
|
27
|
-
names_path =
|
|
28
|
-
# names_path = Path(sys._MEIPASS) / "resources/names.json"
|
|
34
|
+
names_path = get_resource_path("resources/names.json")
|
|
29
35
|
try:
|
|
30
36
|
with names_path.open("r", encoding="utf-8") as names_f:
|
|
31
37
|
self._names: dict[str, Any] = json.load(names_f)
|
|
@@ -70,9 +76,9 @@ class MatchLogger:
|
|
|
70
76
|
match_info = self._get_match_info()
|
|
71
77
|
versus_mode, versus_rule = match_info[2], match_info[3]
|
|
72
78
|
if self._ctx.options.log_level == "standard":
|
|
73
|
-
match_log = (f"\nMatch {match_count}\n\n{uf.player_table_header(self._ctx.options.service == '
|
|
79
|
+
match_log = (f"\nMatch {match_count}\n\n{uf.player_table_header(self._ctx.options.service == 'altendo')}\n"
|
|
74
80
|
if self._ctx.options.auto_logging or self._ctx.options.single_log else
|
|
75
|
-
f"\n{uf.player_table_header(self._ctx.options.service == '
|
|
81
|
+
f"\n{uf.player_table_header(self._ctx.options.service == 'altendo')}\n")
|
|
76
82
|
else:
|
|
77
83
|
match_log = self._format_match_info(match_count, date, session_id, match_info)
|
|
78
84
|
|
|
@@ -144,7 +150,7 @@ class MatchLogger:
|
|
|
144
150
|
)
|
|
145
151
|
|
|
146
152
|
def _format_match_log(self, player_info: PlayerInfo, vs_mode: int) -> str:
|
|
147
|
-
network_id_type = "
|
|
153
|
+
network_id_type = "ANID" if self._ctx.options.service == "altendo" else "PNID"
|
|
148
154
|
indent = " " * (self._align + 2)
|
|
149
155
|
fest_info = (
|
|
150
156
|
f"{indent}Splatfest: Team: {self._get_name('fest_team', player_info.fest_team)} ({player_info.fest_team}) | "
|
|
@@ -94,7 +94,7 @@ def command_lobby_info(ctx: AppContext) -> bool:
|
|
|
94
94
|
if players:
|
|
95
95
|
print("\nPlayers (from first to last joined, you will always be first):")
|
|
96
96
|
print(
|
|
97
|
-
f"\n{'PID':<10} | {'
|
|
97
|
+
f"\n{'PID':<10} | {'ANID' if ctx.options.service == 'altendo' else 'PNID':<16}\n{'-' * 30}"
|
|
98
98
|
)
|
|
99
99
|
for player in players:
|
|
100
100
|
print(f"{player[0]} | {player[1]}")
|
|
@@ -194,7 +194,7 @@ def splatlog(ctx: AppContext, match_logger: MatchLogger | None, match_count: int
|
|
|
194
194
|
session_id = get_session_id(ctx)
|
|
195
195
|
player_count = get_player_count(ctx, adrs.main_mgr_base_adr)
|
|
196
196
|
|
|
197
|
-
print_if_not_silent(ctx, uf.player_table_header(ctx.options.service == "
|
|
197
|
+
print_if_not_silent(ctx, uf.player_table_header(ctx.options.service == "altendo"))
|
|
198
198
|
|
|
199
199
|
player_info_list: list[PlayerInfo] = []
|
|
200
200
|
request_errors: list[str] = []
|
|
@@ -291,7 +291,7 @@ def get_player_account_info(ctx: AppContext, player_pid: int, player_name: str)
|
|
|
291
291
|
if ctx.options.service == "none":
|
|
292
292
|
return AccountInfo("", player_name, "")
|
|
293
293
|
|
|
294
|
-
act_info =
|
|
294
|
+
act_info = get_altendo_account_info(player_pid) if ctx.options.service == "altendo" else get_pn_account_info(player_pid)
|
|
295
295
|
if act_info.request_error:
|
|
296
296
|
return AccountInfo("", player_name, act_info.request_error)
|
|
297
297
|
|
|
@@ -382,7 +382,7 @@ def get_pn_account_info(player_pid: int) -> AccountInfo:
|
|
|
382
382
|
time.sleep(1)
|
|
383
383
|
continue
|
|
384
384
|
|
|
385
|
-
response = uf.process_response(raw_response,
|
|
385
|
+
response = uf.process_response(raw_response, altendo=False)
|
|
386
386
|
if response is None:
|
|
387
387
|
request_error = "Got empty or invalid response."
|
|
388
388
|
time.sleep(1)
|
|
@@ -397,7 +397,7 @@ def get_pn_account_info(player_pid: int) -> AccountInfo:
|
|
|
397
397
|
return AccountInfo(user_id, mii_name, request_error)
|
|
398
398
|
|
|
399
399
|
|
|
400
|
-
def
|
|
400
|
+
def get_altendo_account_info(player_pid: int) -> AccountInfo:
|
|
401
401
|
user_id = ""
|
|
402
402
|
mii_name = ""
|
|
403
403
|
request_error = ""
|
|
@@ -405,12 +405,12 @@ def get_spfn_account_info(player_pid: int) -> AccountInfo:
|
|
|
405
405
|
for _ in range(3):
|
|
406
406
|
try:
|
|
407
407
|
raw_response = requests.get(
|
|
408
|
-
f"https://account.
|
|
408
|
+
f"https://account.altendo.cc/v1/api/admin/mapped_ids?input_type=pid&output_type=user_id&input={player_pid}",
|
|
409
409
|
headers={"User-Agent": "Mozilla/5.0"},
|
|
410
410
|
timeout=5
|
|
411
411
|
)
|
|
412
412
|
mii_data_response = requests.get(
|
|
413
|
-
f"https://account.
|
|
413
|
+
f"https://account.altendo.cc/api/v2/users/{player_pid}/mii",
|
|
414
414
|
headers={"User-Agent": "Mozilla/5.0"},
|
|
415
415
|
timeout=5
|
|
416
416
|
)
|
|
@@ -425,7 +425,7 @@ def get_spfn_account_info(player_pid: int) -> AccountInfo:
|
|
|
425
425
|
time.sleep(1)
|
|
426
426
|
continue
|
|
427
427
|
|
|
428
|
-
response = uf.process_response(raw_response,
|
|
428
|
+
response = uf.process_response(raw_response, altendo=True)
|
|
429
429
|
if response is None:
|
|
430
430
|
request_error = "Got empty or invalid response."
|
|
431
431
|
time.sleep(1)
|
|
@@ -26,8 +26,8 @@ from cleantext import clean # type: ignore[import-untyped]
|
|
|
26
26
|
logging.disable(logging.NOTSET)
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
def player_table_header(
|
|
30
|
-
return f"{'Player':<8} | {'PID':<10} | {'
|
|
29
|
+
def player_table_header(altendo: bool) -> str:
|
|
30
|
+
return f"{'Player':<8} | {'PID':<10} | {'ANID' if altendo else 'PNID':<16} | Name\n{'-' * 60}"
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
def player_table_entry(player_info: PlayerInfo, act_info: AccountInfo) -> str:
|
|
@@ -81,12 +81,12 @@ def handle_gecko_errors(func: Callable[..., Any]) -> Any:
|
|
|
81
81
|
return wrapper
|
|
82
82
|
|
|
83
83
|
|
|
84
|
-
def process_response(response: requests.Response,
|
|
84
|
+
def process_response(response: requests.Response, altendo: bool) -> tuple[str, str] | None:
|
|
85
85
|
try:
|
|
86
86
|
root = ElementTree.fromstring(response.text)
|
|
87
87
|
assert len(root) != 0
|
|
88
88
|
|
|
89
|
-
if
|
|
89
|
+
if altendo:
|
|
90
90
|
user_id = root[0].find("out_id")
|
|
91
91
|
assert isinstance(user_id, ElementTree.Element) and user_id.text is not None
|
|
92
92
|
|
|
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
|