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.
sudo easy_install pygments gem install albino
require 'albino' puts Albino.colorize('puts "Hello World"', :ruby)
require 'albino' @syntaxer = Albino.new(File.new('albino.rb'), :ruby, :bbcode) puts @syntaxer.colorize
require 'albino/multi' ruby, python = Albino::Multi.colorize([ [:ruby,'1+2'], [:python,'1-2'] ])