nctu_oj_cli
Version, currently master branch1 version
- master branchlatestSep 2, 2021
github.com/c910335/nctu-oj-cli
CLI for NCTU OJ
7 stars
0 dependents
License: MIT
Installation
# Add this to your shard.yml
dependencies:
nctu_oj_cli:
github: c910335/nctu-oj-cli
branch: mastermaster is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
1.0.0- License
- MIT
- Author
- Tatsiujin Chin
- Target
nctu_ojfrom src/nctu_oj.cr
Dependencies
Runtime Dependencies
- kilt~> 0.6.1github: jeromegn/kilt
- slang~> 1.7.3github: jeromegn/slang
- admiral~> 1.11.4github: jwaldrip/admiral.cr
Development Dependencies
- ameba~> 0.14.3github: crystal-ameba/amebadev
README
NCTU OJ CLI
CLI for NCTU OJ
Installation
- Clone this repository.
$ git clone https://github.com/c910335/nctu-oj-cli.git
$ cd nctu-oj-cli
- Compile it.
$ shards build
- Edit the configuration file.
$ cp config.sample.yml config.yml
$ vim config.yml
Usage
$ bin/nctu_oj --help
Usage:
bin/nctu_oj [flags...] [arg...]
CLI for NCTU OJ (https://oj.nctu.edu.tw)
Flags:
--help # Displays help for the current command.
Subcommands:
codes # Download all AC codes.
scoreboard # Generate a scoreboard into scoreboard.html
testdata # Upload test data
Download Codes
$ bin/nctu_oj codes --help
Usage:
bin/nctu_oj codes [flags...] [arg...]
Download all AC codes.
Flags:
--help # Displays help for the current command.
--problem-id, -p # Problem ID
--students-only, -s # Only download student's codes
Generate Scodeboard
$ bin/nctu_oj scoreboard --help
Usage:
bin/nctu_oj scoreboard [flags...] [arg...]
Generate a scoreboard into scoreboard.html
Flags:
--help # Displays help for the current command.
--judge, -j (default: "pass") # Judge type (must be pass or score)
--message, -m # The message on the top of scoreboard
--output, -o (default: "scoreboard.html") # Output filename
--refresh, -r # Auto refreshing period
Upload Test Data
$ bin/nctu_oj testdata --help
Usage:
bin/nctu_oj testdata [flags...] [arg...]
Upload test data
Flags:
--clear, -c # Delete test data before upload
--dir, -d # Test data dir
--help # Displays help for the current command.
--memory, -m (default: 262144) # Memory limit (KB)
--number, -n (default: 10) # The number of test data includes sample
--output, -o (default: 262144) # Output limit (KB)
--problem-id, -p # Problem id
--reducer, -r (default: "min") # Reducer for score (must be min or sum)
--sample, -s (default: 2) # The number of sample test data
--time, -t (default: 1000) # Time limit (ms)
Contributing
- Fork it (https://github.com/c910335/nctu-oj-cli/fork)
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
Contributors
- Tatsiujin Chin - creator and maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
master- Seen
- Sep 2, 2021
- Crystal
1.0.0- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/c910335/nctu-oj-cli
Metadata
- Created
- Aug 12, 2026
- Updated
- Oct 25, 2026
- Synced
- Oct 25, 2026
- Versions
- 1