Katpis is a command-line interface for kattis.com
Katpis allow you to fetch sample files, test your program, and submit your solution, all within your favorite commmand-line.
It is inspired by the official, but barebones CLI at github.com/Kattis/kattis-cli
Currently, we don't automatically build installers, so for now installation steps are as follows:
Install .NET Core SDK
Clone this repository
Add the root of this repository to your path enviroment variables - e.g. C:\Users\myuser\somefolder\katpis
Now you can run the command katpis
anywhere!
We will provide installation instructions for these platforms in the near future. You might be able to get it to work using the instructions for Windows.
Submits a .java
file from the current directory to Kattis with a matching name to a Kattis problem shortname.
katpis submit <filename-with-extension>
katpis submit Hello.java
Tests any matching .in
and .ans
files on any .java
problem in the current directory.
katpis test
Fetches any available sample files, given the shortname of any Kattis problem.
katpis fetch <kattis-problem-shortname>
For the problem "Quality-Adjusted Life-Year" at open.kattis.com/problems/qaly, run
katpis fetch qaly
You should now see the newly downloaded files in your current directory, if any sample files were available.
Generates a new file from a template with basic input parsing.
katpis template <filename-with-extension>
katpis template Hello.java
The above command will generate a .java
file to the current directory.
To run katpis using .NET Core SDK, the following command can be used:
dotnet run [args]
You can pass any arguments, e.g. sub command and its arguments, after dotnet run
To rebuild and restart the program, every time the source code changes, use the following command:
dotnet watch run [args]