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