Skip to main content

mkcpr is a command line utility that helps you to build your Competitive Programming Reference in PDF.

Project description

mkcpr

Competitive Programming Reference Builder Tool

About

mkcpr is a command line utility written in python that helps you to build your Competitive Programming Reference in PDF.

This command will generate a LaTex formatted file, which will be ready to be compiled into your new Competitive Programming Reference, using any online or local LaTex compiler of your preference.

Usage

  • In your working directory run:
mkcpr [CONFIG FILE PATH]

Note: [CONFIG FILE PATH] is an optional parameter with "mkcpr-config.json" as default value

Requirements

  • python 3.5+
  • Online or local LaTex compiler
  • Folder containing your codes for programming competitions
  • LaTex template (you can use the one provided in this repository template.tex)
  • Configuration File (described below)

Configuration File Options

{
  "codeFolder" : "Code Folder Path", // Path to your actual code for reference
  "templatePath" : "template.tex", // LaTex template path
  "outputFilePath" : "output.tex", // path where you want the LaTex code
  "excluded" : [".vscode", "__pycache__"], // folders not to consider
  "columns" : 2, // number of columns in your reference
  "templatePlaceHolder" : "CODE HERE", // text to replace in your template
  "sortBefore" : ["Data Structures"], // files or folders will appear first
  "sortAfter" : ["Extras"] // file or folders will appear at the end
}

Installation

  1. Run:
  pip install mkcpr --user
  1. Copy the template and configuration files located in the root of this repository template.tex and mkcpr-config.json to your working directory
  2. Update mkcpr-config.json according to the Configuration file options section.

Features

  • One single command and your reference will be ready to compile
  • Build it with your own style
  • support for most file extensions. (.cpp, .py, .java, .tex, .sh, ...)
  • Build your reference just from your competitive programming code folder.
  • Forget about undesired line breaks by specifying the lines of code you want together in the same page with a single comment before your lines of code.

Example

You can see an example of how a working directory would look like HERE

License

mkcpr is licensed under the GNU General Public License v3.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mkcpr-1.0.7.tar.gz (17.8 kB view hashes)

Uploaded Source

Built Distribution

mkcpr-1.0.7-py3-none-any.whl (18.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page