Skip to content

heiseish/kt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kattis unofficial command line helper

pypi wheel license download

Inspired by (and works well with) xalanq's codeforce tool

Sample usage

1. Config your template type

First and foremost, download your kattisrc file and put it in your $HOME directory (ie ~/.kattisrc). After that, run

kt config

to configure your code template. This will allow the tool to quickly generate code template for your problem.

2. Generate folder for problem statement and sample intputs and outputs

kt gen <problem_id>

For example, if you want to attempt problem Distinctive Character, the problem ID is distinctivecharacter. From your kattis working folder, type in

kt gen distinctivecharacter

You should be able to see 2 set of sample inputs/outputs generated in a folder called distinctivecharacter

After that, you can cd into the folder and start working on the problem.

3. Test your code

If you've set up your config properly, you should be ready to test whether your code pass sample input and output. Simply run

kt test

And observe the difference ..

Submit file and check result on the terminal

From your current problem folder

kt submit

You should be able to see how many test cases your code has passed so far

$ kt open -h
Usage: kt open [problem_id]

    Open the default browser with the link to the full problem statement on Kattis. If no problem id is provided, the problem id wil be deduced using the
    current directionary name

    Options
    --------
    problem_id: Kattis problem id

Update version of kttool

Check current version of kttool

kt version

If there is a newer version, you can run

kt update

to check.

Installation

pip install --upgrade kttool

Reference

License

MIT License

Remaining features yet to be implemented

  • Multiple profiles. Ability to switch between Kattis open domain and competition domain with ease