JOJ-Submitter
Submit your work to JOJ via CLI. Greatly improve your efficiency when uploading to JOJ.
Getting Started
Setup venv (Optional)
python3 -m venv env
source env/Scripts/activate
Install
$ pip install joj-submitter
$ joj-submit --help
Usage: joj-submit [OPTIONS] PROBLEM_URL COMPRESSED_FILE_PATH
LANG:[c|cc|llvm-c|llvm-cc|cmake|make|ocaml|matlab|cs|pas|jav
a|py|py3|octave|php|rs|hs|js|go|rb|other] [SID]
Arguments:
PROBLEM_URL [required]
COMPRESSED_FILE_PATH [required]
LANG:[c|cc|llvm-c|llvm-cc|cmake|make|ocaml|matlab|cs|pas|java|py|py3|octave|php|rs|hs|js|go|rb|other]
other: other | c: C | cc: C++ | llvm-c: C
(Clang, with memory check) | llvm-cc: C++
(Clang++, with memory check) | cmake: CMake
| make: GNU Make | ocaml: OCaml | matlab:
MATLAB | cs: C# | pas: Pascal | java: Java |
py: Python | py3: Python 3 | octave: Octave
| php: PHP | rs: Rust | hs: Haskell | js:
JavaScript | go: Go | rb: Ruby [required]
[SID] [env var: JOJ_SID;default: <EMPTY>]
Options:
-s, --skip Return immediately once uploaded. [default: False]
-a, --all Show detail of all cases, even accepted. [default: False]
-d, --detail Show stderr, Your answer and JOJ answer section. [default: False]
-j, --json Print the result in json format to stdout. [default: False]
--version Show version.
--help Show this message and exit.
Example
First get your JOJ_SID with https://github.com/BoYanZh/JI-Auth or via browser on your own.
Replace <YOUR_JOJ_SID> in the following methods with your actual SID.
Method 1 Call directly via CLI
- Mark
JOJ_SIDshell variable. - Run
joj-submitwith arguments.
$ export JOJ_SID=<YOUR_JOJ_SID>
$ joj-submit https://joj.sjtu.edu.cn/d/vg101_fall_2020_manuel/homework/5fb1f1379fedcc0006622a06/5fb1ee8b9fedcc00066229d9 ans.zip cc
ans.zip upload succeed, record url https://joj.sjtu.edu.cn/d/vg101_fall_2020_manuel/records/60e42b17597d580006c571d6
status: Accepted, accept number: 49, score: 980, total time: 6167 ms, peak memory: 33.684 MiB
Method 2 Call from Makefile
- Add
export JOJ_SID=<YOUR_JOJ_SID>to your~/.bashrcor~/.zshrc. Do not forget to restart the shell to load the variable. - Edit and add this Makefile to your project https://gist.github.com/BoYanZh/6ee60b76f0fc70389c9ac0988fd16885.
- Run
make joj.
$ make joj
tar -cvzf p4-src.tar.gz main.cpp
main.cpp
joj-submit https://joj.sjtu.edu.cn/d/ve281_summer_2021_hongyi/homework/60ed8820597d590006d91e44/60ed869b597d590006d91dad p4-src.tar.gz cc -w
p4-src.tar.gz upload succeed, record url https://joj.sjtu.edu.cn/d/ve281_summer_2021_hongyi/records/60f4451537f07210064b8c20
status: Accepted, accept number: 49, score: 980, total time: 6167 ms, peak memory: 33.684 MiB
Acknowledgements
Metadata
Release files for joj-submitter 0.0.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| joj-submitter-0.0.10.tar.gz | 7.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| joj_submitter-0.0.10-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.6 kB
Release files / joj-submitter-0.0.10.tar.gz
| Download URL | joj-submitter-0.0.10.tar.gz |
|---|---|
| Size | 7.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b25de20a966158701279c38ec5304ff96267d84bf7f7671f62f93f6648c3b907
|
|
BLAKE2b-256 checksum How to use checksums |
81b4b735d09374c42b4bf3350a2e23fc02605fd3b118927eaa91505f6d1b4812
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.15
|
Release files / joj_submitter-0.0.10-py3-none-any.whl
| Download URL | joj_submitter-0.0.10-py3-none-any.whl |
|---|---|
| Size | 7.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1c5509416afe5bbe5a6a5d782a12e2908539b9888dbc07755e742dbf919ac5ae
|
|
BLAKE2b-256 checksum How to use checksums |
60c5b3ce9421c4aa0f66ba8df619d0b4b4f33f837d3aecf29f1d8c0130ea2b6d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.15
|
Security for joj-submitter 0.0.10
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.