Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Ruby wrapper for the Pygments syntax highlighter.
Ruby
branch: master

This branch is 4 commits ahead, 5 commits behind github-archive:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
test
vendor
.gitignore
Gemfile
LICENSE
README.md
Rakefile
albino.gemspec

README.md

Albino: a ruby wrapper for pygmentize

This project is an extraction from GitHub.

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

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

You can also include options for the parser

require 'albino'
Albino.colorize('puts "Hello World"', :ruby, :html, 'utf-8', "linenos=True")

Multi

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