Tag your stat.ink matches to a YouTube livestream with ease.
I noticed that matches on stat.ink has a "URL related to this battle" section. As I stream my Splatoon 3 games for archival purposes, I thought it would be nice to have a tool that automatically tags my games to the stream with their appropriate timestamp.
Thus, born this project.
$ splat-tagger --help
Tag your stat.ink matches to a YouTube livestream with ease!
Usage: splat-tagger [OPTIONS] <YOUTUBE_STREAM_URL>
Arguments:
<YOUTUBE_STREAM_URL> The Youtube stream URL to fetch data from (e.g. `dQw4w9WgXcQ`)
Options:
-o, --offset <OFFSET> Amount of seconds to adjust for any stream delays [default: 10]
--config-dir <CONFIG_DIR> The directory to store configuration files
-n, --dry-run Whether to run the script without modifying any data
-g, --gen-desc Generate a YouTube description containing a summary of the battles
-h, --help Print help
-V, --version Print versionDownload the latest release from the releases page.
On Unix / macOS systems, you'll need to allow the binary to be executed with chmod +x splat-tagger.
Run the executable on a terminal (command prompt) with the YouTube stream URL as the first argument.
Install Rust and Cargo from rustup.rs then run:
$ cargo install --git https://github.com/angeloanan/splat-taggerThe first run of the app will fail as the app lacks any configuration. The app will generate a configuration file in the your local app config directory:
- Windows:
%LOCALAPPDATA%\splat-tagger - macOS:
~/Library/Application Support/splat-tagger - Linux:
$XDG_CONFIG_HOME/splat-taggeror~/.config/splat-tagger
To look up videos on YouTube, you'll need a Google API key.
- Go to the Google Cloud Console
- Create a new project or select an existing one
- Search for the YouTube Data API v3 and enable the API
- Go to the APIs & Services > Credentials page and create a new credential (API key)
- Copy the API key to the configuration file
- Log in to stat.ink
- Open the developer tools (F12) and go to the Application tab
- On the left, go to the Cookies section and select
https://stat.ink - Find a Cookie named
_identityand copy its value to the configuration file
This project uses Rust and Cargo
To build the project, clone the repository and run cargo build.
Contributions are welcome, though not expected and not guaranteed to be merged; this is a personal project after all.
Feel free to fork and adapt this project to your needs.