cpgen

package module
v0.0.0-...-a4036a2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2023 License: MIT Imports: 6 Imported by: 0

README

cpgen

A terminal based application that generates competitive programming solution files with templates and configurations.

Table of Contents

Installation

Prerequisites

Download the source code and run the following make commands to install the program in the GOBIN directory.

make install-cli # cli version
# OR
make install-tui # terminal UI version

Usage

CLI
  • Make sure the binary has been installed.
  • When using CLI version, options can be passed with flags. Run cpgen-cli -h to view options.
TUI
  • Make sure the binary has been installed.
  • Run cpgen

Contributing

  • Fork the repository.
  • Create a new branch.
  • Make changes and commit.
Roadmap
  • Add support for other competitive programming websites
  • Add more templates

Don't forget to star 🌟 the repository if you found this useful. Thanks ❤️

Screenshots

CLI

cli screenshot

TUI
option screen

files screen

loading screen

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(files []string, c Config, folder string) <-chan float64

Generate takes the files and their configs to generate the project. files should not contain file extension. folderName is "solution" by default when empty

Types

type Config

type Config struct {
	FileIO *IO  // input.txt and output.txt files instead of stdin and stdout respectively
	Pq     bool // include priority queue struct and methods
	Uf     bool // include unionfind struct and methods
	Sv     bool // include sieve of eratosthenes
	Cf     bool // codeforces style template with `t` testcases
}

Config contains the parameters used to generate the files to be used

type IO

type IO struct {
	Input, Output string
}

Directories

Path Synopsis
cmd
cli command
tui command
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL