Coder Social home page Coder Social logo

erfaniaa / codes2pdf Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pin3da/notebook-generator

196.0 6.0 33.0 621 KB

Auto-generate a PDF notebook from your source codes (useful for ACM-ICPC)

License: Mozilla Public License 2.0

TeX 26.03% JavaScript 73.97%
acm icpc code notebook cheatsheet pdf

codes2pdf's Introduction

codes2pdf

Auto generate a PDF notebook from your source codes (useful for your ACM-ICPC cheatsheet)

Dependencies

This generator works in both Linux and Windows, so check how to install TeX Live in your OS.

TeX Live for linux:

sudo aptitude install texlive

TeX Live for Windows:

download installer (install-tl-windows.exe) from https://www.tug.org/texlive/acquire-netinstall.html

Also install the latest version of Node.js and NPM on your machine (you can download them from https://nodejs.org/en/download/).

After installing Node.js on Linux, add this command to your ~/.bashrc:

export PATH="$HOME/.npm_modules/bin:$PATH"

Install

sudo npm install -g codes2pdf

Update

sudo npm update -g codes2pdf

Use

Usage: codes2pdf <source_dir> [options]

Auto generate a PDF notebook from your source codes

Options:

    -V, --version             output the version number
    -a --author [name]        author's name to be added in the notebook
    -i --initials [initials]  initials of the author to be placed in the upper-right corner of all pages
    -o --output [filename]    output file for the notebook. Default to `./notebook.pdf`
    -h, --help                output usage information

example:

codes2pdf ./ /tmp/team_reference.pdf
codes2pdf ./ --author "Shahid Beheshti University" --initials SBU

The second one will create a 'notebook.pdf' file in the current directory, from the source code files which are located in the current directory and its subdirectories.

The notebook generator will add your source code with syntax highlighting, additionally you can add .tex files which will be rendered as Latex code.

Sample PDF

Here you can find a sample: https://github.com/Erfaniaa/codes2pdf/blob/master/sample_notebook.pdf

(In this forked version of the original repository, the generated notebook file will have three columns in each page with a smaller font size; so you can put more source codes in a few number of pages for ACM-ICPC contests.)

Sample PDF Screenshots

Notes

  • Try to use up to 3 "levels" in your source code.
  • Use spaces insead of underscore (in the filenames) to print a prettier TOC.
  • In this forked version of the original repository, the generated notebook will have three columns in each page with a smaller line spacing. This is useful when you have a large number of different source codes and there is a limit on the number of pages for creating a cheatsheet.
  • The original repository was created by Manuel Pineda and Diego Restrepo.

codes2pdf's People

Contributors

pin3da avatar erfaniaa avatar diegores14 avatar

Stargazers

Ali Ghanbari avatar Md. Mehrab Hussain Sumon avatar Kumar Abhishek avatar Jihan Bakshi avatar  avatar Mewo avatar Bardiya Kariminia avatar Barbod Coliaie avatar Prasoon Kushwaha avatar Nikita Zhenev avatar Sudipto Dey Himel avatar Nicholas Mendez avatar De@th_Gunner_00I avatar Sergio Sakellaropoulos avatar Georgios Karapidakis avatar Md. Ashikujjaman Nur avatar Shariful Islam avatar Hasan Bijoy  avatar Juan Pablo Cabaña avatar Martynas Šmaižys avatar Julio Vivas avatar MARSUDTSEAL avatar Maharun Afroz avatar Iman Mohammadi avatar Sabbir Ahmed Talukdar avatar Tarun Sai Phani Varma avatar Michael Yang avatar Anh Bui avatar Omar Faruk Khan avatar Shadman avatar Md. Hasnain Ali avatar Abidur Rahman avatar Linyi Dai avatar Andrés Chirinos avatar Sina Taheri avatar  avatar Serag el-dein Amged avatar Amir Mohseni avatar niuez avatar Luke Videckis avatar Pulkit Kumar Agarwal avatar Rubayet Sadman Sami avatar Zakaria Hossain avatar Leonardo Santos avatar Sudhanshu Dubey avatar Neeraj Gupta avatar  avatar URK avatar Mohammadreza Mohammadzadeh Asl avatar Udaya Bhaskar Cheepurupalli avatar Aagam Jain avatar yamenw avatar Shane Chiu avatar Angramme avatar Edwin Ansari avatar Roozbeh Sharifnasab avatar chiatzen avatar Wang Jiwei avatar methimpact avatar Jerry.C avatar Tweetu avatar N̷̩̩͇̺̲͍̗̟̋̔ĩ̴̡̃̀͋͌̾̄̑͒͝ș̸̢̡͉̥̆̓̾̑̊͂͜h̶̡̳̐̓̀̏̒̉̐͘̚͜ͅą̴̞̻͕̠͕̱̦̰̿ͅǹ̴̞͔͔̼͇ṯ̶̼̝̞͕̝̼̫̭̿ḩ̸̧̟̪̪̞̈́̎̏̈͋͠ ̵̛͉͓͎̞͆̆͌̕͝Ŕ̶̭̩̤̪̗͕͓̐̒e̷̮̫͈̹̮̓̀̍̈́̇́̐͑͝͝ͅd̸̬̎̈́̌̔d̴͙͓̅̔̅͐͌̇̅͒̒ý̷̢̤͉̞̜̰͎̈́́̀͐̈́̕͝ avatar N̷̪̞͈̓̀̒ͅi̵̩̺̋̊̀̆̿̂͊̇s̷͚͕͙͈̙̻̀̓͛̇͐͗̿̈̿͠ͅḧ̵͍̻́̑̽̆̇͂̈̈́a̴̧̡͈̥̜͑̄͆ͅń̶̨̧̹̤͍̹̙͛̓͘͜ͅt̵͖̳̣͎̦̰̱̖̬̐̐̓͂͆͠ͅh̴̢̨̛͇̘̪͖̼͚̋̌͂̀̅̍̀̕̚ͅͅ ̷̹͕̩̮̇̾̈̈̐͝ͅR̸͖̀͊̀̎͊́͛̒͘͘ę̴̟͍̣̻͈̮̝̫̞͘d̴͓̺̺̙͖̥̫̣͕̈́͛̅̍͑d̶̜̰̠͓̦̳̟̤̀̿̕y̵̩̮̿̎͐̍̃̃̚͝͠ avatar Timothy Mou avatar Noor Muhammad Tamim avatar Hooman Edraki avatar kokoa avatar Alexander Kovrigin avatar Hoomân Hedayati avatar  avatar Mehan alavimajd avatar Amirmohammad Ghazi dizaji avatar Moein Halvaei avatar ArmanAminian avatar Iman Mousaei avatar Amir Hosseini avatar  avatar Harshit Mogalapalli avatar Prakhar Gupta avatar Curie avatar Mohammadreza Mohseni avatar Shikher Sinha avatar  avatar Jivitesh Jain avatar Tanish Lad avatar Wes avatar  avatar Libao Jin avatar yang hui avatar Youssef avatar Chris Hart avatar  avatar Timothy Spann avatar sterlinm avatar Will avatar Caleb Xu avatar Aaron DeVera avatar TomBen avatar foxgem avatar  avatar

Watchers

evandrix avatar  avatar Tony Cheng avatar  avatar Altynai avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.