2022-10-18 03:25:09 -04:00
|
|
|
# s3si.ts
|
2022-10-18 08:08:26 -04:00
|
|
|
|
2022-11-16 08:19:18 -05:00
|
|
|
[](https://github.com/spacemeowx2/s3si.ts/actions/workflows/ci.yaml)
|
|
|
|
|
[](https://github.com/spacemeowx2/s3si.ts/actions/workflows/constant-check.yaml)
|
|
|
|
|
|
2022-10-24 15:34:14 -04:00
|
|
|
Export your battles from SplatNet to stat.ink.
|
|
|
|
|
|
|
|
|
|
If you have used s3s, please see [here](#migrate-from-s3s).
|
2022-10-18 08:08:26 -04:00
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
2022-10-21 04:46:35 -04:00
|
|
|
1. Install [deno](https://deno.land/)
|
2022-10-18 08:08:26 -04:00
|
|
|
|
|
|
|
|
2. Run
|
2022-11-08 06:37:22 -05:00
|
|
|
`deno run -Ar https://raw.githubusercontent.com/spacemeowx2/s3si.ts/main/s3si.ts [options]`
|
2022-10-19 04:00:40 -04:00
|
|
|
|
2022-10-21 06:58:36 -04:00
|
|
|
```
|
|
|
|
|
Options:
|
|
|
|
|
--profile-path <path>, -p Path to config file (default: ./profile.json)
|
|
|
|
|
--exporter <exporter>, -e Exporter list to use (default: stat.ink)
|
|
|
|
|
Multiple exporters can be separated by commas
|
|
|
|
|
(e.g. "stat.ink,file")
|
|
|
|
|
--no-progress, -n Disable progress bar
|
2022-10-24 15:34:14 -04:00
|
|
|
--monitor, -m Monitor mode
|
|
|
|
|
--skip-mode <mode>, -s Skip mode (default: null)
|
|
|
|
|
("vs", "coop")
|
|
|
|
|
--help Show this help message and exit`,
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
3. If it's your first time running this, follow the instructions to login to
|
|
|
|
|
Nintendo Account. Your token will be saved to `profile.json` for future use.
|
|
|
|
|
|
|
|
|
|
- If you want to use a different profile, use `-p` to specify the path to the
|
|
|
|
|
profile file.
|
|
|
|
|
|
2022-10-30 09:27:55 -04:00
|
|
|
### Track your rank
|
|
|
|
|
|
|
|
|
|
- Run
|
|
|
|
|
`deno run -Ar https://raw.githubusercontent.com/spacemeowx2/s3si.ts/main/initRank.ts`
|
|
|
|
|
to initialize your rank data. (You can also use `-p` to specify the path to
|
|
|
|
|
the profile file.)
|
|
|
|
|
|
|
|
|
|
- Then enter your current rank and rank point. For example: `S+0,300`. And the
|
|
|
|
|
rank will be saved in the `profile.json`.
|
|
|
|
|
|
|
|
|
|
- After that, run `s3si.ts`, the rank point will be reported to `stat.ink`.
|
|
|
|
|
|
2022-10-24 15:34:14 -04:00
|
|
|
### profile.json
|
|
|
|
|
|
|
|
|
|
```js
|
|
|
|
|
{
|
|
|
|
|
// cacheDir is the directory to store cache files
|
|
|
|
|
"cacheDir": "./cache",
|
|
|
|
|
// don't change this if you don't know what it is
|
|
|
|
|
"fGen": "https://api.imink.app/f",
|
|
|
|
|
// if you run with -e file, this is the directory to store exported files
|
|
|
|
|
"fileExportPath": "./export",
|
|
|
|
|
// the interval to check for new battles in monitor mode
|
|
|
|
|
"monitorInterval": 500,
|
|
|
|
|
// login token
|
|
|
|
|
"loginState": {
|
|
|
|
|
"sessionToken": "...",
|
|
|
|
|
"gToken": "...",
|
|
|
|
|
"bulletToken": "..."
|
|
|
|
|
},
|
|
|
|
|
// userLang will effect the language of the exported games to stat.ink
|
|
|
|
|
"userLang": "zh-CN",
|
|
|
|
|
"userCountry": "JP",
|
|
|
|
|
"statInkApiKey": "..."
|
|
|
|
|
}
|
2022-10-21 06:58:36 -04:00
|
|
|
```
|
|
|
|
|
|
2022-10-24 15:34:14 -04:00
|
|
|
## Migrate from s3s
|
|
|
|
|
|
|
|
|
|
If you have used `s3s` before, you can migrate your data to `s3si.ts` by
|
|
|
|
|
creating a `profile.json` file with the following contents:
|
|
|
|
|
|
|
|
|
|
```json
|
|
|
|
|
{
|
|
|
|
|
"loginState": {
|
|
|
|
|
"sessionToken": "<session_token in your s3s' config.txt>"
|
|
|
|
|
},
|
|
|
|
|
"statInkApiKey": "<your stat.ink API key>"
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Then run `s3si.ts`, and it will work without login prompt.
|
|
|
|
|
|
2022-10-19 04:00:40 -04:00
|
|
|
## Credits
|
|
|
|
|
|
|
|
|
|
- https://github.com/frozenpandaman/s3s
|
2022-11-08 06:44:45 -05:00
|
|
|
- https://github.dev/fetus-hina/stat.ink
|