Compare commits
No commits in common. "94fb731fe01d4c7060c6b9b683b52ff724a1bcd1" and "425fa1ef73332892b6d3dc2c0d9db7a61574e7e9" have entirely different histories.
94fb731fe0
...
425fa1ef73
11
README.md
11
README.md
|
|
@ -3,7 +3,7 @@
|
||||||
[](https://github.com/spacemeowx2/s3si.ts/actions/workflows/ci.yaml)
|
[](https://github.com/spacemeowx2/s3si.ts/actions/workflows/ci.yaml)
|
||||||
[](https://github.com/spacemeowx2/s3si.ts/actions/workflows/constant-check.yaml)
|
[](https://github.com/spacemeowx2/s3si.ts/actions/workflows/constant-check.yaml)
|
||||||
|
|
||||||
Export your battles from SplatNet to stat.ink and Splashcat.
|
Export your battles from SplatNet to stat.ink.
|
||||||
|
|
||||||
If you have used s3s, please see [here](#migrate-from-s3s).
|
If you have used s3s, please see [here](#migrate-from-s3s).
|
||||||
|
|
||||||
|
|
@ -19,7 +19,7 @@ Options:
|
||||||
--profile-path <path>, -p Path to config file (default: ./profile.json)
|
--profile-path <path>, -p Path to config file (default: ./profile.json)
|
||||||
--exporter <exporter>, -e Exporter list to use (default: stat.ink)
|
--exporter <exporter>, -e Exporter list to use (default: stat.ink)
|
||||||
Multiple exporters can be separated by commas
|
Multiple exporters can be separated by commas
|
||||||
(e.g. "stat.ink,file,splashcat")
|
(e.g. "stat.ink,file")
|
||||||
--list-method When set to "latest", the latest 50 matches will be obtained.
|
--list-method When set to "latest", the latest 50 matches will be obtained.
|
||||||
When set to "all", matches of all modes will be obtained with a maximum of 250 matches (5 modes x 50 matches).
|
When set to "all", matches of all modes will be obtained with a maximum of 250 matches (5 modes x 50 matches).
|
||||||
When set to "auto", the latest 50 matches will be obtained. If 50 matches have not been uploaded yet, matches will be obtained from the list of all modes.
|
When set to "auto", the latest 50 matches will be obtained. If 50 matches have not been uploaded yet, matches will be obtained from the list of all modes.
|
||||||
|
|
@ -38,10 +38,6 @@ Options:
|
||||||
- If you want to use a different profile, use `-p` to specify the path to the
|
- If you want to use a different profile, use `-p` to specify the path to the
|
||||||
profile file.
|
profile file.
|
||||||
|
|
||||||
### Splashcat Notes
|
|
||||||
|
|
||||||
Due to limitations with SplatNet 3 data, Splashcat requires battles uploaded to use `en-US` (set with `userLang`). Splashcat will localize most parts of battle results into the user's language when displayed.
|
|
||||||
|
|
||||||
### Track your rank
|
### Track your rank
|
||||||
|
|
||||||
- Run
|
- Run
|
||||||
|
|
@ -75,8 +71,7 @@ Due to limitations with SplatNet 3 data, Splashcat requires battles uploaded to
|
||||||
// userLang will effect the language of the exported games to stat.ink
|
// userLang will effect the language of the exported games to stat.ink
|
||||||
"userLang": "zh-CN",
|
"userLang": "zh-CN",
|
||||||
"userCountry": "JP",
|
"userCountry": "JP",
|
||||||
"statInkApiKey": "...",
|
"statInkApiKey": "..."
|
||||||
"splashcatApiKey": "..."
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
2
s3si.ts
2
s3si.ts
|
|
@ -29,7 +29,7 @@ Options:
|
||||||
--profile-path <path>, -p Path to config file (default: ./profile.json)
|
--profile-path <path>, -p Path to config file (default: ./profile.json)
|
||||||
--exporter <exporter>, -e Exporter list to use (default: stat.ink)
|
--exporter <exporter>, -e Exporter list to use (default: stat.ink)
|
||||||
Multiple exporters can be separated by commas
|
Multiple exporters can be separated by commas
|
||||||
(e.g. "stat.ink,file,splashcat")
|
(e.g. "stat.ink,file")
|
||||||
--list-method When set to "latest", the latest 50 matches will be obtained.
|
--list-method When set to "latest", the latest 50 matches will be obtained.
|
||||||
When set to "all", matches of all modes will be obtained with a maximum of 250 matches (5 modes x 50 matches).
|
When set to "all", matches of all modes will be obtained with a maximum of 250 matches (5 modes x 50 matches).
|
||||||
When set to "auto", the latest 50 matches will be obtained. If 50 matches have not been uploaded yet, matches will be obtained from the list of all modes.
|
When set to "auto", the latest 50 matches will be obtained. If 50 matches have not been uploaded yet, matches will be obtained from the list of all modes.
|
||||||
|
|
|
||||||
24
src/app.ts
24
src/app.ts
|
|
@ -9,7 +9,6 @@ import { FileExporter } from "./exporters/file.ts";
|
||||||
import { delay, showError } from "./utils.ts";
|
import { delay, showError } from "./utils.ts";
|
||||||
import { GameFetcher } from "./GameFetcher.ts";
|
import { GameFetcher } from "./GameFetcher.ts";
|
||||||
import { DEFAULT_ENV, Env } from "./env.ts";
|
import { DEFAULT_ENV, Env } from "./env.ts";
|
||||||
import { SplashcatExporter } from "./exporters/splashcat.ts";
|
|
||||||
|
|
||||||
export type Opts = {
|
export type Opts = {
|
||||||
profilePath: string;
|
profilePath: string;
|
||||||
|
|
@ -221,29 +220,6 @@ export class App {
|
||||||
out.push(new FileExporter(state.fileExportPath));
|
out.push(new FileExporter(state.fileExportPath));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (exporters.includes("splashcat")) {
|
|
||||||
if (!state.splashcatApiKey) {
|
|
||||||
const key = (await this.env.prompts.prompt(
|
|
||||||
"Splashcat API key is not set. Please enter below.",
|
|
||||||
)).trim();
|
|
||||||
if (!key) {
|
|
||||||
this.env.logger.error("API key is required.");
|
|
||||||
Deno.exit(1);
|
|
||||||
}
|
|
||||||
await this.profile.writeState({
|
|
||||||
...state,
|
|
||||||
splashcatApiKey: key,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
out.push(
|
|
||||||
new SplashcatExporter({
|
|
||||||
splashcatApiKey: this.profile.state.splashcatApiKey!,
|
|
||||||
uploadMode: this.opts.monitor ? "Monitoring" : "Manual",
|
|
||||||
env: this.env,
|
|
||||||
}),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
exporterProgress(title: string) {
|
exporterProgress(title: string) {
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,6 @@ export type State = {
|
||||||
statInkApiKey?: string;
|
statInkApiKey?: string;
|
||||||
fileExportPath: string;
|
fileExportPath: string;
|
||||||
monitorInterval: number;
|
monitorInterval: number;
|
||||||
splashcatApiKey?: string;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export const DEFAULT_STATE: State = {
|
export const DEFAULT_STATE: State = {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue