Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 1c5f47259f
Fetching contributors…

Cannot retrieve contributors at this time

32 lines (18 sloc) 0.67 kb

Albino: a ruby wrapper for pygmentize

This project is an extraction from GitHub.

For this and other extractions, see http://github.com/github

Note: This library is deprecated in favor of pygments.rb.

Installation

sudo easy_install pygments
gem install albino

Usage

Simple

require 'albino'
puts Albino.colorize('puts "Hello World"', :ruby)

Advanced

require 'albino'
@syntaxer = Albino.new(File.new('albino.rb'), :ruby, :bbcode)
puts @syntaxer.colorize

Multi

require 'albino/multi'
ruby, python = Albino::Multi.colorize([ [:ruby,'1+2'], [:python,'1-2'] ])
Jump to Line
Something went wrong with that request. Please try again.