CodeRippa takes your source code and turns it into a beautiful PDF file. Currently, it supports 150 languages and 84 themes, all of which are available in TextMate.
You will definitely need a TeX distribution installed. To check, simply type pdflatex
.
In case your system doesn't have pdflatex
, you should install a LaTeX distribution.
$ gem install code_rippa
Usage: code_rippa [options] file_or_directory
-l, --list-themes List all available themes
-t, --theme THEME Selected theme
-n, --list-syntax List all available syntax
-h, --help Display this screen
Many of the themes found in CodeRippa can be found here
$ code_rippa -l
active4d
all_hallows_eve
amy
made_of_code
twilight
zenburnesque
... more themes omitted
Example:
Without theme specified (defaults to: made_of_code):
$ code_rippa path_to_single_file.rb
With theme specified:
$ code_rippa -t zenburnesque path_to_single_file.rb
Note that the output file is saved as out.pdf in the current directory where code_rippa was called from.
Example:
Without theme specified (defaults to: made_of_code):
$ code_rippa path_to_directory
With theme specified:
$ code_rippa -t rubyblue path_to_directory
Note that the output file is saved as out.pdf in the current directory where code_rippa was called from.
None of this would be possible without the awesome ultraviolet spox-ultraviolet and language_sniffer gems. Props to lwheng for providing most of the LaTeX help.
Currently this gem is in its infancy. Any bug reports and feature requests are very welcomed.
- Compile pdf by default.
- Choose a more sane theme (Code) by default.
- Include LICENCE.
- Syntax files are finally compatible for
psych
- Abandoned
syck
completely forpsych
- Ruby 2.x compatibility! \o/
- Thanks @jasonyeo for the initial push towards Ruby 2.x compatibility.
- Using language_sniffer in place of Linguist for automated source code language detection
- Themes! Glorious themes! 84 themes to choose from! Props to filmgirl, and the rest of the wonderful TM users who submitted their themes.
- Wrap lines of troublesome files such as minified javascript and parser generator outputs.
- Sensible defaults, removed the need for specifying the syntax
- Detects if pdflatex is installed, and automatically runs pdflatex if so
- Proper cleanup after LaTeX successfully completes
- Include MiniTest specs
- Better performance when parsing.
- Code documentation.
- Removed dependency on Linguist.
- Tidier code.
- Initial gem push
- Fixed many stupid bugs along the way