Project

lolize

0.01
No commit activity in last 3 years
No release in over 3 years
Colorize your ruby stdout with Lolcat
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0

Runtime

~> 0.8.3
 Project Readme

Lolize

Colorize your ruby output with rainbow :)

The colorize algorithm is based on lolcat.

Installation

gem install lolize

You need 256-color terminal for best experience.

How to lolize

Just require lolize/auto. it will automatically hook your $stdout and $stderr.

Bundler Gemfile

For example, you can do this in your rails project:

# Gemfile
gem 'lolize', :require => 'lolize/auto'

Rails with lolize

Any Ruby, anywhere

Here is the snippet:

gem 'lolize'
require 'lolize/auto'

You can even do this in your compass config.rb:

Compass watch with lolize

Don't colorize everything please

gem 'lolize'
require 'lolize'
colorizer = Lolize::Colorizer.new
colorizer.write "Hello, World\n"*5
puts "I AM WHITE" # This is clean

Why lolize

Why ask? Just for fun LOL.

Why not pipe with lolcat?

If you try this:

rails c 2>&1 | lolcat

You will find that the last line won't be displayed forever. It seems hard to solve this problem, some platform-dependent C-extension is needed.

Caution

  • This is just a fun project
  • Never use this in your production project!!!!
    • It will slow your console output
    • If something gets wrong within output hook, the program might crash silently

License

MIT License