RustでAtCoderに参加する際のローカル環境を快適にするためのCLIツール。
何番煎じかは知りませんが、Rustの勉強がてら自分で実装してみたいと思った次第です。
$ cargo install --git https://github.com/ryuma017/rustcoder
実装予定の機能 / TODO
- ワークスペースを新規作成
-
targetを共有するための.cargo/config.tomlを生成 - Gitリポジトリ初期化
-
.gitignoreを生成
-
- コンテスト用のcargoパッケージ生成
$ rustcoder help
rustcoder 0.1.0
Convenient toolchain for AtCoder written in Rust
USAGE:
rustcoder <SUBCOMMAND>
OPTIONS:
-h, --help Print help information
-V, --version Print version information
SUBCOMMANDS:
help Print this message or the help of the given subcommand(s)
init Create workspace for AtCoder
start Cerate new workspace for specified contest
$ rustcoder init [directory]
[directory](default: atcoder_workspace)
├── .cargo
│ └── config.toml
├── .git
└── .gitignore
以下のことを行います。
- コンテストごとのcargoパッケージを並べるためのワークスペース生成
- Gitリポジトリ初期化
targetを共有するための.cargo/config.tomlなどを生成。
$ rustcoder start <contest-name>
<contest-name>
├── Cargo.toml
└── src
└── bin
├── a.rs
├── b.rs
├── c.rs
...
該当コンテストページから必要な情報をスクレイピングによって抽出し、必要なバイナリファイルを含んだcargoパッケージを生成します。