Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Code Rippa

Code Rippa

This is a short presentation I gave at Singapore Ruby Brigade meetup. Code Rippa takes source code and translate this into a single PDF that is themed, bookmarked, and syntax highlighted.

Benjamin Tan Wei Hao

May 29, 2012
Tweet

More Decks by Benjamin Tan Wei Hao

Other Decks in Programming

Transcript

  1. How do you read <source code> Offline? * * you

    do read source code, right ?
  2. Pop Quiz: How is it that CoffeeScript is written in

    ... Coffeescript? Short Answer: Boot strapping.
  3. {code} ↦ CodeRippa ↦ {PDF}   " CodeRippa is my

    attempt to make source code reading a more pleasurable experience, and help programmers get better at their craft. " – Me. What does it do?
  4. Features Syntax Highlighting 1 $ code_rippa –n c coffeescript erlang

    haskell java javascript ruby prolog python $ code_rippa –n | wc –l 143
  5. Features Themes! 2 $ code_rippa –n blackboard brilliance_black cobalt happy_happy_joy_joy_2

    ir_black made_of_code monokai railscasts solarized_dark $ code_rippa –l | wc –l 84
  6. $ code_rippa -h Usage: code_rippa [options] input_file_or_directory Parses input_file or

    directory and outputs a file named out.tex. Unless specified, 'Made of Code' is used as the default theme. To see all themes, type: code_rippa -l Examples: 1. code_rippa path_to_file.rb (uses default theme) 2. code_rippa -t rubyblue path_to_file.rb (with theme specified) 3. code_rippa -t rubyblue path_to_dir Then run `pdflatex -interaction=batchmode out.tex` to generate the PDF output. Options: -t, --theme THEME Selected theme -n, --list-syntax List all available syntax -l, --list-themes List all available themes -v, --version Display version number -h, --help Display this screen Building a command line tool in Ruby.