Chris@210: = CodeRay Chris@210: Chris@210: [- Tired of blue'n'gray? Try the original version of this documentation on Chris@210: coderay.rubychan.de[http://coderay.rubychan.de/doc/] (use Ctrl+Click to open it in its own frame.) -] Chris@210: Chris@210: == About Chris@210: CodeRay is a Ruby library for syntax highlighting. Chris@210: Chris@210: Syntax highlighting means: You put your code in, and you get it back colored; Chris@210: Keywords, strings, floats, comments - all in different colors. Chris@210: And with line numbers. Chris@210: Chris@210: *Syntax* *Highlighting*... Chris@210: * makes code easier to read and maintain Chris@210: * lets you detect syntax errors faster Chris@210: * helps you to understand the syntax of a language Chris@210: * looks nice Chris@210: * is what everybody should have on their website Chris@210: * solves all your problems and makes the girls run after you Chris@210: Chris@210: Version: 0.9.7 Chris@210: Author:: murphy (Kornelius Kalnbach) Chris@210: Contact:: murphy rubychan de Chris@210: Website:: coderay.rubychan.de[http://coderay.rubychan.de] Chris@210: License:: GNU LGPL; see LICENSE file in the main directory. Chris@210: Chris@210: == Installation Chris@210: Chris@210: You need RubyGems[http://rubyforge.org/frs/?group_id=126]. Chris@210: Chris@210: % gem install coderay Chris@210: Chris@210: Chris@210: === Dependencies Chris@210: Chris@210: CodeRay needs Ruby 1.8.6 or later. It also runs with Ruby 1.9.1+ and JRuby 1.1+. Chris@210: Chris@210: Chris@210: == Example Usage Chris@210: (Forgive me, but this is not highlighted.) Chris@210: Chris@210: require 'coderay' Chris@210: Chris@210: tokens = CodeRay.scan "puts 'Hello, world!'", :ruby Chris@210: page = tokens.html :line_numbers => :inline, :wrap => :page Chris@210: puts page Chris@210: Chris@210: Chris@210: == Documentation Chris@210: Chris@210: See CodeRay. Chris@210: Chris@210: Please report errors in this documentation to . Chris@210: Chris@210: Chris@210: == Credits Chris@210: Chris@210: === Special Thanks to Chris@210: Chris@210: * licenser (Heinz N. Gies) for ending my QBasic career, inventing the Coder Chris@210: project and the input/output plugin system. Chris@210: CodeRay would not exist without him. Chris@210: * bovi (Daniel Bovensiepen) for helping me out on various occasions. Chris@210: Chris@210: === Thanks to Chris@210: Chris@210: * Caleb Clausen for writing RubyLexer (see Chris@210: http://rubyforge.org/projects/rubylexer) and lots of very interesting mail Chris@210: traffic Chris@210: * birkenfeld (Georg Brandl) and mitsuhiku (Arnim Ronacher) for PyKleur, now pygments. Chris@210: You guys rock! Chris@210: * Jamis Buck for writing Syntax (see http://rubyforge.org/projects/syntax) Chris@210: I got some useful ideas from it. Chris@210: * Doug Kearns and everyone else who worked on ruby.vim - it not only helped me Chris@210: coding CodeRay, but also gave me a wonderful target to reach for the Ruby Chris@210: scanner. Chris@210: * everyone who uses CodeBB on http://www.rubyforen.de and http://www.python-forum.de Chris@210: * iGEL, magichisoka, manveru, WoNáDo and everyone I forgot from rubyforen.de Chris@210: * Dethix from ruby-mine.de Chris@210: * zickzackw Chris@210: * Dookie (who is no longer with us...) and Leonidas from http://www.python-forum.de Chris@210: * Andreas Schwarz for finding out that CaseIgnoringWordList was not case Chris@210: ignoring! Such things really make you write tests. Chris@210: * closure for the first version of the Scheme scanner. Chris@210: * Stefan Walk for the first version of the JavaScript and PHP scanners. Chris@210: * Josh Goebel for another version of the JavaScript scanner, a SQL and a Diff scanner. Chris@210: * Jonathan Younger for pointing out the licence confusion caused by wrong LICENSE file. Chris@210: * Jeremy Hinegardner for finding the shebang-on-empty-file bug in FileType. Chris@210: * Charles Oliver Nutter and Yehuda Katz for helping me benchmark CodeRay on JRuby. Chris@210: * Andreas Neuhaus for pointing out a markup bug in coderay/for_redcloth. Chris@210: * 0xf30fc7 for the FileType patch concerning Delphi file extensions. Chris@210: * The folks at redmine.org - thank you for using and fixing CodeRay! Chris@210: * Keith Pitt for his SQL scanners Chris@210: * Rob Aldred for the terminal encoder Chris@210: * Trans for pointing out $DEBUG dependencies Chris@210: * Flameeyes for finding that Term::ANSIColor was obsolete Chris@210: * Etienne Massip for reporting a serious bug in JavaScript scanner Chris@210: * matz and all Ruby gods and gurus Chris@210: * The inventors of: the computer, the internet, the true color display, HTML & Chris@210: CSS, VIM, Ruby, pizza, microwaves, guitars, scouting, programming, anime, Chris@210: manga, coke and green ice tea. Chris@210: Chris@210: Where would we be without all those people? Chris@210: Chris@210: === Created using Chris@210: Chris@210: * Ruby[http://ruby-lang.org/] Chris@210: * Chihiro (my Sony VAIO laptop); Henrietta (my old MacBook); Chris@210: Triella, born Rico (my new MacBook); as well as Chris@210: Seras and Hikari (my PCs) Chris@210: * RDE[http://homepage2.nifty.com/sakazuki/rde_e.html], Chris@210: VIM[http://vim.org] and TextMate[http://macromates.com] Chris@210: * Subversion[http://subversion.tigris.org/] Chris@210: * Redmine[http://redmine.org/] Chris@210: * Firefox[http://www.mozilla.org/products/firefox/], Chris@210: Firebug[http://getfirebug.com/], Safari[http://www.apple.com/safari/], and Chris@210: Thunderbird[http://www.mozilla.org/products/thunderbird/] Chris@210: * RubyGems[http://docs.rubygems.org/] and Rake[http://rake.rubyforge.org/] Chris@210: * TortoiseSVN[http://tortoisesvn.tigris.org/] using Apache via Chris@210: XAMPP[http://www.apachefriends.org/en/xampp.html] Chris@210: * RDoc (though I'm quite unsatisfied with it) Chris@210: * Microsoft Windows (yes, I confess!) and MacOS X Chris@210: * GNUWin32, MinGW and some other tools to make the shell under windows a bit Chris@210: less useless Chris@210: * Term::ANSIColor[http://term-ansicolor.rubyforge.org/] Chris@210: * PLEAC[http://pleac.sourceforge.net/] code examples Chris@210: Chris@210: === Free Chris@210: Chris@210: * As you can see, CodeRay was created under heavy use of *free* software. Chris@210: * So CodeRay is also *free*. Chris@210: * If you use CodeRay to create software, think about making this software Chris@210: *free*, too. Chris@210: * Thanks :)