Skip to main content

Script to automatically upload new files appearing in a directory to sc2replaystats.

Project description

sc2replaystats_uploader

image image Documentation Status

Script to automatically upload new StarCraft II replays appearing in a directory to sc2replaystats.

Installation

Just pip install sc2replaystats_uploader!

Usage

The parameters are documented:


dominik@dell ~/Code/sc2replaystats_uploader % sc2replaystats_uploader --help                                                                                                             [0]
Usage: sc2replaystats_uploader [OPTIONS]

  Console script for sc2replaystats_uploader.

Options:
  --hashkey TEXT  sc2replaystats hashkey; find it in
                  https://sc2replaystats.com/account/settings -> Login Panel
                  [required]

  --auth TEXT     sc2replaystats authorization key; find it in
                  https://sc2replaystats.com/account/settings -> API Access
                  [required]

  --path PATH     Directories in which to find replays. You can put multiple
                  such options here. If using multiple in an environment
                  variable, separate them with a colon ':'.  [required]

  --help          Show this message and exit.

You can either put them in as flags:


sc2replaystats_uploader --auth "AUTHKEYGOESHERE" --hashkey "HASHKEYGOESHERE" --path "EU_REPLAY_DIR" --path "US_REPLAY_DIR"

Or you can use environment variables:

export SC2REPLAYSTATS_AUTH="AUTHKEYGOESHERE"
export SC2REPLAYSTATS_HASHKEY="HASHKEYGOESHERE"
export SC2REPLAYSTATS_PATHS="EU_REPLAY_DIR:US_REPLAY_DIR"
sc2replaystats_uploader

You can exit through Control-C.

Usage with Lutris

I launch these scripts with SC2 through Lutris. In "System options", set a path to a pre-launch script to an executable Bash file containing the following:

#!/usr/bin/bash
# do other stuff, Toggl tracking, etc
export SC2REPLAYSTATS_AUTH="AUTHKEYGOESHERE"
export SC2REPLAYSTATS_HASHKEY="HASHKEYGOESHERE"
export SC2REPLAYSTATS_PATHS="EU_REPLAY_DIR:US_REPLAY_DIR"
sc2replaystats_uploader

Then, to shut the script down, have a post-exit script that goes

#!/usr/bin/bash
pkill -f sc2replaystats_uploader

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

History

0.1.0 (2020-08-25)

  • First release on PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sc2replaystats_uploader-0.1.5.tar.gz (15.1 kB view details)

Uploaded Source

Built Distribution

sc2replaystats_uploader-0.1.5-py2.py3-none-any.whl (6.3 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file sc2replaystats_uploader-0.1.5.tar.gz.

File metadata

  • Download URL: sc2replaystats_uploader-0.1.5.tar.gz
  • Upload date:
  • Size: 15.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for sc2replaystats_uploader-0.1.5.tar.gz
Algorithm Hash digest
SHA256 7929f238afc1fe9bf4d5ca416d8e1d0aeac5fd54ca29c3dd4952d5fc8c8007eb
MD5 693cb88c30d373f8851fd120eac0d20e
BLAKE2b-256 526fc74dd871e0899cfea8377225ddef9bfe7884db7bc5a12a81e4967948f461

See more details on using hashes here.

File details

Details for the file sc2replaystats_uploader-0.1.5-py2.py3-none-any.whl.

File metadata

  • Download URL: sc2replaystats_uploader-0.1.5-py2.py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for sc2replaystats_uploader-0.1.5-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ad5cbcb64dd2df98050f04b83ddd59868b4d10aefc683c1db33bd23d76057e9c
MD5 0acf4dc09825a2b9e43a613b06da2a1a
BLAKE2b-256 00f8170adfd11e2dbf3cbaea716dd5e0e6414c2203e06cd41b9aa83e2016cbc7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page