#competitive #cli #windows

bin+lib snowchains

Tools for online programming contests

16 releases (6 breaking)

0.7.0 Nov 24, 2020
0.5.4 Sep 25, 2020
0.3.3 May 1, 2020
0.3.0 Jan 29, 2020
0.2.0 Mar 3, 2019

#1554 in Command line utilities

Download history 33/week @ 2023-10-28 1/week @ 2023-11-04 2/week @ 2023-11-11 21/week @ 2023-11-18 34/week @ 2023-11-25 35/week @ 2023-12-02 2/week @ 2023-12-09 17/week @ 2023-12-16 32/week @ 2023-12-23 1/week @ 2023-12-30 17/week @ 2024-01-06 32/week @ 2024-01-20 32/week @ 2024-01-27 1/week @ 2024-02-03 39/week @ 2024-02-10

104 downloads per month

MIT/Apache

330KB
8K SLoC

Snowchains

CI Crates.io Crates.io

Tools for online programming contests.

Features

  • Scrapes sample cases as YAML
  • Tests a source file with downloaded sample cases
  • Submits a source file
  • Downloads source file you have submitted
Register to a contest Get sample test cases Get system test cases Submit Get submissions Watch submissions
AtCoder ✔️ ✔️ ✔️ ✔️ ✔️
Codeforces ✔️ N/A ✔️
yukicoder N/A ✔️ ✔️ ✔️

Instrallation

GitHub Releases

https://github.com/qryxip/snowchains/releases

cargo install (Crates.io)

$ cargo install snowchains

cargo install (GitHub)

$ cargo install --git https://github.com/qryxip/snowchains

Usage

$ snowchains -h
snowchains 0.5.2
Ryo Yamashita <qryxip@gmail.com>
Tools for online programming contests

USAGE:
    snowchains <SUBCOMMAND>

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

SUBCOMMANDS:
    init           Create a new config file [aliases: i]
    login          Logges in to a service [aliases: l]
    participate    Participates in a contest
    retrieve       Retrieves data [aliases: r]
    download       Alias for `retrieve testcases` [aliases: d]
    watch          Watches data [aliases: w]
    judge          Tests code [aliases: j, test, t]
    submit         Submits code [aliases: s]
    xtask          Runs a custom subcommand written in the config file [aliases: x]
    help           Prints this message or the help of the given subcommand(s)
$ snowchains r -h
snowchains-retrieve 0.5.2
Ryo Yamashita <qryxip@gmail.com>
Retrieves data

USAGE:
    snowchains retrieve <SUBCOMMAND>

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

SUBCOMMANDS:
    languages               Retrieves list of languages [aliases: l]
    testcases               Retrieves test cases [aliases: t]
    submission-summaries    Retrieves submission summaries [aliases: ss]
    help                    Prints this message or the help of the given subcommand(s)
$ snowchains w -h
snowchains-watch 0.5.2
Ryo Yamashita <qryxip@gmail.com>
Watches data

USAGE:
    snowchains watch <SUBCOMMAND>

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

SUBCOMMANDS:
    submissions    Watches your submissions [aliases: s]
    help           Prints this message or the help of the given subcommand(s)
$ snowchains i .
Wrote `/home/ryo/src/local/a/snowchains.dhall`
$ snowchains x setup -h
usage: snowchains xtask setup [-h] [-p [PROBLEM [PROBLEM ...]]] service contest {cpp,rs} {code,vim,emacs}

positional arguments:
  service
  contest
  {cpp,rs}
  {code,vim,emacs}

optional arguments:
  -h, --help            show this help message and exit
  -p [PROBLEM [PROBLEM ...]], --problems [PROBLEM [PROBLEM ...]]
$ echo "$ATCODER_USERNAME\n$ATCODER_PASSWORD" | snowchains x setup atcoder practice cpp code
GET https://atcoder.jp/contests/practice/tasks ... 404 Not Found
GET https://atcoder.jp/contests/practice ... 200 OK
Username: Password: GET https://atcoder.jp/login ... 200 OK
POST https://atcoder.jp/login ... 302 Found
GET https://atcoder.jp/settings ... 200 OK
GET https://atcoder.jp/contests/practice ... 200 OK
GET https://atcoder.jp/contests/practice/tasks ... 200 OK
GET https://atcoder.jp/contests/practice/tasks_print ... 200 OK
A: Saved to /home/ryo/src/local/a/.snowchains/tests/atcoder/practice/a.yml (2 test cases)
B: Saved to /home/ryo/src/local/a/.snowchains/tests/atcoder/practice/b.yml (interactive problem)
Opening https://atcoder.jp/contests/practice/tasks/practice_1 ...
Opening https://atcoder.jp/contests/practice/tasks/practice_2 ...

Screenshot

Record

License

Dual-licensed under MIT or Apache-2.0.

Dependencies

~28–44MB
~740K SLoC