albino 0 ruby Rubygems

Ruby wrapper for the Pygments syntax highlighter.

Albino: a ruby wrapper for pygmentize

This project is a hack of an extraction from GitHub.

The issue I faced is that Ryan Tomayko’s rocco literate programming tool depends on this. That’s cool, but albino used to depend on posix-spawn, which depends on a C library, which won’t work in JRuby.

This fork removes posix-spawn, instead using popen, which works just fine in JRuby on Mac OS X. As a casualty, the API for Albino#execute has changed, for which I am deeply sorry unapologetic.

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'] ])

Related Repositories

albino

albino

Ruby wrapper for the Pygments syntax highlighter. ...

GFM-Service

GFM-Service

GitHub Flavored Markdown Service is a webservice to interface the redcarpet and albino libraries written by GitHub. ...

albino

albino

Ruby wrapper for the Pygments syntax highlighter. ...

albino

albino

Ruby wrapper for the Pygments syntax highlighter. ...

albino

albino

Ruby wrapper for the Pygments syntax highlighter. ...


Top Contributors

technoweenie tmm1 bkerley mislav defunkt atmos nathany

Releases

-   v1.3.3 zip tar
-   v1.3.2 zip tar
-   v1.3.0 zip tar
-   v1.2.3 zip tar
-   v1.2.2 zip tar
-   v1.2.1 zip tar
-   v1.2.0 zip tar
-   v1.1.1 zip tar
-   v1.1 zip tar