9 个稳定版本
| 1.6.6 | 2023年8月30日 | 
|---|---|
| 1.6.5 | 2023年7月27日 | 
| 0.2.0 | 2020年9月5日 | 
| 0.1.0 | 2020年9月3日 | 
523 在 命令行工具 中排名
90 每月下载次数
68KB
 1.5K  SLoC
kattis.rs
为 Kattis 问题存档 中的问题提供简单的自动化测试器。
用法
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
提交
CLI 的最简单用法是在你想测试和提交目录中最新编辑的文件时
$ kattis -s
此命令将在当前目录中找到最新编辑的有效文件,并使用来自 www.open.kattis.com 的输入和输出进行测试,如果通过则提交。
安装
使用 Cargo
首先使用 rustup 安装 Rust 工具链。这将安装 Cargo。
$ cargo install kattis-rs
安装路径将在安装后显示。通过将 cargo 二进制目录添加到 PATH 中将其添加到 PATH 中(通常为 $HOME/.cargo/bin)。
kattis-rs 仅在 macOS 和 Linux 上进行测试,但应在 Windows 上工作。
依赖项
~17–35MB
~532K SLoC