This tool saves you from tedious repetitive actions when solving problems, such as manually copying and pasting sample test cases, copying your template files, etc. . In addition, it helps organising all the problems that you solve into an organised workspace structure for future reference.
With qkly
, your workspace structure would look similar to the following:
.
├── qkly.yaml
├── solutions
│ ├── atcoder
│ │ └── abc246
│ │ └── a
│ │ ├── 1.in.txt
│ │ ├── 1.out.txt
│ │ ├── 2.in.txt
│ │ ├── 2.out.txt
│ │ ├── main.cpp
│ │ └── Makefile
│ └── codeforces
│ └── 1665
│ └── a
│ ├── 1.in.txt
│ ├── 1.out.txt
│ ├── main.cpp
│ └── Makefile
└── templates
└── default
├── main.cpp
└── Makefile
qkly.yaml
is the configuration file for aqkly
workspace. At the moment, the only thing that you can set is the port thatqkly fetch
listens on. An emptyqkly.yaml
file in the current directory is suffice to runqkly fetch
.solutions
is the directory where all your solutions go. All tasks are organised nicely into a hierarchy of judges, contests, and problem ids.templates/default
is the directory where all your template files go. These files will be automatically copied to each task directory on fetching withqkly fetch
.
The current version of the tool offers the following features:
This command, used in combination with the browser plugin Competitive Companion (available on Firefox and Chrome), initiates a local http server to listen for POST requests from Competitive Companion to get sample test cases, create solution directories and copy all of your template files into these directories.
Note that you could only run qkly fetch
in the root directory of your workspace.
The general use case is as follows:
- The user runs
qkly fetch
.qkly
starts waiting for Competitive Companion to fetch information of one or more tasks. - The user navigates to a problem or contest on an online judge website and clicks on the Competitive Companion plus icon in the browser's toolbar. When this happen, Competitive Companion sends one or more POST requests to
qkly
, each contains information of a task with all of its sample test cases.
qkly
will then:
- Create a designated directory for each task/problem based on the online judge, the id of the contest and the id of the problem.
- Fetch sample test cases into the task directory.
- Copy template files into the task directory automatically.
Since the project is still in its very early version, no binary is released just yet.
- Requirement: latest version of go (at least
1.17
)
$ git clone https://github.com/nathan-wien/qkly.git
$ cd qkly
$ go install ./cmd/qkly
At the moment, this tool supports the following online judges:
Judge | Judge ID |
---|---|
AtCoder | atcoder |
CodeForces | codeforces |
CSES | cses |
HackerRank | hackerrank |
SPOJ | spoj |
T.B.D.