Test your code of "BIT Online coding homework" more easily and conveniently!
pip install bit-online-code-helper
And you should confirm that g++
command is available. For example, running g++ -v
in the terminal to confirm.
With this, you can test and commit your code which use only 2 seconds totally:
- Save your code in the editor (Ctrl + S)
- Switch to show cmd or PowerShell window (Alt + Tab)
- Press "↑" on your keyboard to automatically repeat your last test command
- Press "Enter" on your keyboard, wait for test result!
# bch means 'BITOnline Code Helper'
# local code test
# -l means '--local'
bch -l [bit_online_problem_url] [source_file_url]
# online code test
# commit your code to BIT Online to test
# -o means '--online'
bch -o [bit_online_problem_url] [source_file_url]
# local and online code test
# automaticlly commit your code to BIT Online to test after local test passed
# -lo means '--local_online'
bch -lo [bit_online_problem_url] [source_file_url]
# e.g.
# bch -lo "http://lexue.bit.edu.cn/mod/programming/view.php?id=32165" "E:\coding\1.c"
- Use cache to store the problem info to avoid frequently request the website
- Improve related features which I don't realize now
- Fix bugs