Блог пользователя searleser97

Автор searleser97, 4 года назад, По-английски

mkcpr

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.

About

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

Features

  • 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

Usage

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: https://github.com/searleser97/mkcpr

  • Проголосовать: нравится
  • +16
  • Проголосовать: не нравится