searleser97's blog

By searleser97, 7 months ago, In English


I would like to share a command line utility I made that helped me to build my competitive programming reference for ICPC contests. Hopefully it can help more people :D.


mkcpr is a command line utility that helps you to build your competitive programming reference PDF.


  • 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.
  • One single command and your reference will be ready to compile
  • Easy setup with a single json file
  • Highly configurable


python mkcpr [CONFIG FILE PATH]

The above command will generate a Tex file, which can be compiled with any online or local Tex compiler of your preference.

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

For more details visit:

  • Vote: I like it
  • +16
  • Vote: I do not like it

7 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Thanks! Very useful!!