Skip to content
/ qkly Public

CLI automation tool for competitive programming, aiming to make things happen a bit more quickly (hence the name) in an organised manner

Notifications You must be signed in to change notification settings

nathanwn/qkly

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

qkly

CLI automation tool for competitive programming, aiming to make things happen a bit more quickly (hence the name) in an organised manner.

Golang

GitHub Workflow Status Go Version

📖 Contents

🚀 Features

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 a qkly workspace. At the moment, the only thing that you can set is the port that qkly fetch listens on. An empty qkly.yaml file in the current directory is suffice to run qkly 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 with qkly fetch.

The current version of the tool offers the following features:

▶️ qkly fetch

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.

📦 Installation

Since the project is still in its very early version, no binary is released just yet.

🔨 Manual installation

  • Requirement: latest version of go (at least 1.17)
$ git clone https://github.com/nathan-wien/qkly.git
$ cd qkly
$ go install ./cmd/qkly

✔️ Supported Online Judges

At the moment, this tool supports the following online judges:

Judge Judge ID
AtCoder atcoder
CodeForces codeforces
CSES cses
HackerRank hackerrank
SPOJ spoj

📝 Roadmap

T.B.D.

About

CLI automation tool for competitive programming, aiming to make things happen a bit more quickly (hence the name) in an organised manner

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages