albino 0 ruby Rubygems

Ruby wrapper for the Pygments syntax highlighter.

3 years after MIT

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

pygments.rb

pygments.rb

pygments syntax highlighting in ruby ...

pandoc-ruby

pandoc-ruby

Lightweight Ruby wrapper for Pandoc ...

markium

markium

Inline markdown formatting and pygments syntax highlighting plugin for the Adium ...

ed-rare-trade-route-generator

ed-rare-trade-route-generator

Elite: Dangerous Rare Trade Route Generator ...

rack-pygmentize

rack-pygmentize

Rack middleware to pygmentize your code blocks ...


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