Remus is a syntax highlighter. Remus was inspired by not wanting to do homework, the awesome Python syntax highlighter Pygments, and it takes some ideas from the RubyGem syntax.
-
Can return in Terminal colors, or HTML spans.
-
Can understand complex things like PHP heredocs.
-
Can highlight embedded regions, like CSS in HTML.
-
Simple language definition syntax, lightweight Lexer files.
-
Currently, there is no namespacing for tokens, which could lead to problems with languages like PHP, where it is embedded in HTML
sudo gem install remus
-
hoe
$ remus [options] [code]
(options include language, and token class)
alternatively: Remus can highlight a file
$ remus [options] -f path/to/file
or: inside ruby
puts Remus.convert( string, language = :plain_text, options = {} )
alternatively: inside ruby from a file
puts Remus.convert_from_file( filename, options )
$ echo 'This is to be highlighted' | remus [options]
-
namespacing for languages.
-
maybe create a better callback syntax.
-
expand documentation.
-
expand HTML token class to include line numbers and stuff.
Pull source from github, try to follow other language examples. Please note that Remus aims at having the simplest end-user syntax. I think something that is easy to use will be used more often.
We are accepting languages and ideas.
(The MIT License)
Copyright © 2010 Rocky Meza and William Scales
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ‘Software’), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.