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
- Run:
pip install mkcpr --user
- Copy the template and configuration files located in the root of this repository
template.tex
andmkcpr-config.json
to your working directory - 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.