WARNING: Only Unix-like systems are supported at the moment
A user-friendliness-first CLI client for the Satori testing system. It works by web scraping, since there is no Satori API and the Satori project is "an abandoned project and is not safe for use", as put by its creators and (ex-?)maintainers.
It is still in use though, so that's why SatoriCLI exists in the first place.
Download the latest release, unpack it, cd
into that directory and run install.sh
(will probably need root):
$ tar -xzf SatoriCLI.tar.gz
$ cd SatoriCLI
$ sudo ./install.sh
satori-cli [options] <command> [cmdargs]
Options:
-color
/-nocolor
- enable/disable colored output (default is-color
if the output is a TTY)-cache
/-nocache
- enable/disable caching of data (default-cache
)-remember
/-noremeber
- enable/disable saving the login credentials
Commands: (can be shortened to any of their prefixes)
help
- Get usage helpversion
- Get SatoriCLI versionlogin
- Just prompt for the login credentials and see if they workforget
- Forget the saved login credentialscontests [all|managed|joined|pending|other]
- Retrieve contests listnews <contest>
- Retrieve contest newsproblems <contest>
- Retrieve contest problem listresults <contest> [: [pagesize=10]+[pagenum=1] | : <submit_id>]
- Get results for<submit_id>
or<contest>
submit <contest> : <problem> : <filepath>
- Submit the file under<filepath>
to a problemprofile
- See the user profile
<contest>
can be either a contest id, or one or more strings that should all case-insensitively be present
in the wanted contest name or description. Same is with <problem>
.
The following features are fully implemented:
- Login and saving login credentials
- Retrieving and displaying contest list
- Retrieving and displaying contest problems list
- Getting contest submit results
- Submitting to problems
- Retrieving and displaying user profile
- Caching
The following are at least work-in-progress:
- Retrieving contest news
- Retrieving problem contents
And the following are planned:
- Retrieving and displaying rankings
- Applying to contests
See todo.md
for details.
Clone the repo and run these in the julia REPL: (by running julia
)
] activate .
] resolve
] instantiate
Then to build the full (release) package from source:
- Create a file named
precompile_in.txt
containing:
<a couple of keywords for an existing contest>
<id of that contest>
<id of a problem in that contest>
<path to a file that will be submitted as a solution to that problem>
<username>
<password>
This will be used for compilation, see precompile_app.jl
.
make build
make install
ormake prefix=/usr/local/bin install
(if you want to)
For testing the program, use julia --project -e 'import SatoriCLI; SatoriCLI.julia_main()' -- <program arguments>
- it's way faster than rebuilding the whole package.
Contributions such as implementing new features, or finding ways to retrieve data faster are welcome. You can open an issue concerning the latter one. The code style is pretty much already visible too.