https://github.com/github/albino
Ruby wrapper for the Pygments syntax highlighter.
https://github.com/github/albino
Last synced: 5 months ago
JSON representation
Ruby wrapper for the Pygments syntax highlighter.
- Host: GitHub
- URL: https://github.com/github/albino
- Owner: github
- License: mit
- Archived: true
- Created: 2008-05-11T04:45:03.000Z (almost 18 years ago)
- Default Branch: master
- Last Pushed: 2017-08-06T10:00:06.000Z (over 8 years ago)
- Last Synced: 2024-04-26T12:22:18.823Z (almost 2 years ago)
- Language: Ruby
- Homepage:
- Size: 152 KB
- Stars: 222
- Watchers: 14
- Forks: 39
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
**NOTE: This repository is no longer supported or updated by GitHub. If you wish to continue to develop this code yourself, we recommend you fork it.**
# 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
### Multi
require 'albino/multi'
ruby, python = Albino::Multi.colorize([ [:ruby,'1+2'], [:python,'1-2'] ])