Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

code_rippa

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

code_rippa

bundlerRubyGems.org
Version
0.0.5
Version published
Maintainers
1
Created
Source

CodeRippa

CodeRippa takes your source code and turns it into a beautiful PDF file. Currently, it supports 150 languages and 15 themes, all of which are available in TextMate. More syntaxes and themes will be available soon.

Installation

Add this line to your application's Gemfile:

$ gem 'code_rippa'

And then execute:

$ bundle

Or install it yourself as:

$ gem install code_rippa

Usage

Command line options

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
	-s, --syntax SYNTAX              Selected syntax
	-x, --excluded-exts E1,E2,EN     Exclude these extensions when processing
	-h, --help                       Display this screen

List all available themes

$ code_rippa -l

active4d
all_hallows_eve
amy
moc
twilight
zenburnesque
... more themes omitted

List all supported syntax

$ code_rippa -n

actionscript
erlang
java
javascript
prolog
ruby
yaml
... more syntaxes omitted

Producing PDF from a single file

Example:

$ code_rippa -s ruby -t zenburnesque path_to_single_file.rb

Note that the output file is saved as out.tex in the current directory where code_rippa was called from.

$ pdflatex out.tex			# Saved as out.pdf

	

Producing PDF from a directory

Example:

$ code_rippa -s java -t moc path_to_directory

Note that the output file is saved as out.tex in the current directory where code_rippa was called from.

Then, you'll need to run pdflatex twice. This is because LaTeX needs to generate the bookmarks.

$ pdflatex out.tex			# Saved as out.pdf
$ pdflatex out.tex			# Remember to run this twice!

Note: In case your system doesn't have pdflatex, you can get a LaTeX distribution.

Credits

None of this would be possible without the awesome ultraviolet and spox-ultraviolet gems. Props to lwheng for providing most of the LaTeX help.

Contributing

Currently this gem is in its infancy. Any bug reports and feature requests are very welcomed.

Changelog

0.0.4

  • Removed dependency on Linguist.
  • Tidier code.

0.0.1 - 0.0.3

  • Initial gem push
  • Fixed many stupid bugs along the way

FAQs

Package last updated on 30 Mar 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts