kattis-rs

Crates.iokattis-rs
lib.rskattis-rs
version1.6.6
sourcesrc
created_at2020-09-03 15:55:06.711777
updated_at2023-08-30 17:24:35.187393
descriptionCompetitive programming checker for open.kattis.com
homepagehttps://github.com/marcelroed/
repositoryhttps://github.com/marcelroed/kattis-rs
max_upload_size
id284291
size118,751
Marcel Rød (marcelroed)

documentation

README

kattis.rs

A simple automated problem tester for problems on the Kattis Problem Archive.

crates.io crates.io

Usage

Tests and submits Kattis competitive programming problems.

Usage: kattis [OPTIONS] [PROBLEM]...

Arguments:
  [PROBLEM]...
          Paths of files to test or no arguments.
          Filenames should be of the format {problem}.{ext} where {problem} can be found from the url of the kattis problem at open.kattis.com/problems/{problem}.
          If left empty, the problem to run will be inferred by looking for the latest edited valid source file in the working directory.

Options:
  -s, --submit
          If flag is set, all successful problems will be submitted.

  -f, --force
          Force submission even if submitted problems don't pass local tests.

  -r, --recurse <DEPTH>
          Number of directory levels to recurse into when searching for problem solutions.

          [default: 1]

      --submission-viewer <submission-viewer>
          Viewer to use for submission.

          [default: cli]

          Possible values:
          - cli:     Display updated results in the CLI, blocking until submission has finished
          - browser: Open a new browser window showing the submission and terminate program
          - none:    Just terminate, ignoring submission result

  -h, --help
          Print help (see a summary with '-h')

  -V, --version
          Print version

Submit

The simplest use case for the CLI is when you want to test and submit the latest edited file in a directory:

$ kattis -s

This command will find the latest edited valid file in the current directory and test it using input and output from www.open.kattis.com, then submit it if it passes.

Installation

Using Cargo

First install the Rust toolchain using rustup. This will also install Cargo.

$ cargo install kattis-rs

The installation path will show up after installation. Add it to your PATH by adding the cargo binary directory to PATH (usually $HOME/.cargo/bin).

kattis-rs is only tested on macOS and Linux, but should work on Windows.

Commit count: 105

cargo fmt