Useful tool to speedup testing in cp-programming
Project description
Universal Parser Tool
This tool (a.k.a upt
) helps to fetch sample tests from online judges.
It can be useful to speedup testing codes before final submit.
Install
You can install upt
from pypi using this command:
$ pip install universal-parser-tool
You should be able to run upt
after install.
To login services and use parsers on private webpages, you need to install a supported browser and its driver.
Browser | Driver | Supported | Tested |
---|---|---|---|
Firefox | https://github.com/mozilla/geckodriver/releases | ✅ | ✅ |
Chromium/Chrome | https://sites.google.com/a/chromium.org/chromedriver/downloads | ✅ | ✅ |
Opera | https://github.com/operasoftware/operachromiumdriver/releases | ✅ | ❌ |
Edge | https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/ | ✅ | ❌ |
Safari | Built-in | ✅ | ❌ |
IE | https://selenium-release.storage.googleapis.com/index.html | ❌ | ❌ |
Configurations
All configurations stored at ~/.config/upt
, including upt.conf
(general configs) and cookie.jar
(login cookies).
After installing, You may run upt init
to initialize config options.
Upgrade
You can check current version by running upt -v
. Upgrade to newer version by this command.
$ pip install -U universal-parser-tool
Parsers
At this time, these judges have built-in support.
NOTE: You need to login a service if you want to use it during contest.
Plugins
It is possible to develop and publish your own plugins of upt
.
In this context, plugins are python modules, and their name starts with upt-
.
Several built-in parsers are included in upt-builtin
.
The plugin must provide a register
function, returning a list of classes (inherited from BaseParser
).
After installing the module, upt
automatically finds the plugin and calls register
.
There is a documented example of a parser here.
upt-builtin
is another example that's been tested.
If you have written a good plugin for upt
and have published it on PyPI, notify me so I can add it here.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for universal-parser-tool-5.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e83db6a403ad5db99dd6a5796a4c512017cca6a2eba07e879a2c7e9c630fef34 |
|
MD5 | b69d9a1e51d22a2899b49f4668cd143c |
|
BLAKE2b-256 | 1e156c2f4e6743ddbfefea2c086b27ce71736b56689b1d966b74b8d07817bd9c |
Hashes for universal_parser_tool-5.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 749895f499d5817618302ce9c2beffbac32990ce24bd5eedf3897bbd90ce47c4 |
|
MD5 | 5cd5b964c848c8af60ff082de169c2e3 |
|
BLAKE2b-256 | 35ab886c6af2f793e0431863891f96ea4377db356bf753e44b1bf2cf52950610 |