uris[pider] is a command line tool made in python to interact with the Uri Online Judge.
Currently, it supports the commands:
- Get submissions (with filter options)
- Get last submissions
- Submit a solution
First, you need to instal the Scrapy package (more information in install)
pip install Scrapy
I hope that everything will be fine with Scrapy... If not, consult the manual: install
Finally, to install the uris package, just use:
pip install git+https://github.com/gilbertoalexsantos/uris.git
I particularly recommend to install in a virtual environment (virtualenvwrapper)
uris last 3
It'll get the last 3 submissions
uris subs -lang=java
It'll get the last submissions (20) with the filters:
- Language: Java
uris subs -lang=py3 --answer=tle --code=1899
It'll get the last submissons with the filters:
- Language: Python 3
- Answer: Time Limit Exceed
- Problem Code: 1899
The same command could be rewritten:
uris subs --language=py3 -a=tle -c=1899
uris sub -lang=c++ -code=1788 -sc="source_code.cpp"
It'll submit the problem with the filters:
- Language: C++
- Problem Code: 1788
- Source Code: "source_code.cpp". It's the relative path (you can use absolute path too)
For more information, use the command:
uris help
Or use the help command flag:
uris subs --help
- Python 2.7
Just use:
pip uninstall uris
I really recommend to use virtualenvwrapper. With that, you just need to create a new virtualenv
mkvirtualenv uris
And, in the virtualenv, install the uri package. If you want to uninstall, just remove the virtualenv
rmvirtualenv uris
Simple!
You'll probably want to remove the settings file. It lays in the user directory
~/.uris_settings.json
- Use an insurance prompt when typing the password
- Encrypt the password in the settings file