GitXplorerGitXplorer
t

shiny

public
15 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
b8960da5484e9599ae63b026e744349c500d7ab3

remove Gemfile.lock

ttonini committed 12 years ago
Unverified
4106a71421091381794811d7c70800538e2c3bec

update .gitignore file

ttonini committed 12 years ago
Unverified
0371422a863f16174f3effa398dc51605f6ec12d

add githalytics

ttonini committed 12 years ago
Unverified
52bb6da655e8ca796749bd14eec2642e0596df2e

add travis and codeclimate

ttonini committed 12 years ago
Unverified
c355a8f521d09a9a357f26756528522cd8d95891

clean up project and use bundle gem structure

ttonini committed 12 years ago
Unverified
12112c79973fd9904ca943e1e8fcafac5d256ba2

update README

ttonini committed 12 years ago

README

The README file for this repository.

Build Status Code Climate

Shiny

Shiny extends the ruby core string class with two methods, ansi and html. These two are proxy methods to provide a bunch of color and text formating methods. Over ansi there are the commen known ansi escape sequences available, bold, blink, underline and the whole colorful format things. The method html serves the same but in the html way, it makes the standart w3c color names available and also a few other formats like overline, underline, blink etc.

Installation

$ gem install shiny

Usage

First require it:

require 'shiny'

Some ansi color examples:

puts "magenta".ansi.magenta
puts "bold blue".ansi.bold.blue
puts "yellow on cyan".ansi.yellow.on_cyan
puts "bright blue on green".ansi.bright_blue.on_green
puts "red on bright blue".ansi.red.on_bright_blue

Some other ansi effect examples:

puts "bold".ansi.bold
puts "oh! i'm blinking".ansi.blink
puts "nice and underlined".ansi.underline
puts "other side, please".ansi.negative

Some html color examples: (the html formats should be used in the browser ;)

"orange".html.orange
"bold red".html.bold.red
"yellow on olive".html.yellow.on_olive
"blue on teal".html.blue.on_teal
"fuchsia".html.fuchsia

Some other html effect examples:

"bold".html.bold
"oh! i'm blinking".html.blink
"nice and underlined".html.underline
"overline".html.overline
"line-through".html.line_through

Some terminal helper examples:

include Shiny::Helpers

say("green day?", :color => :green)
say("fail!", :type => :error)

log("for later") # default: logfile.log
log("there please", "myfile.log")

wrap("I'm not alone") # surrounded with the default: # char
wrap("Oh...", "*") # surrounded with the * char

Contributions are very welcome!

  1. Fork shiny
  2. Create a topic branch - git checkout -b my_branch
  3. Push to your branch - git push origin my_branch
  4. Send me a pull-request for your topic branch
  5. That's it!

License

See LICENSE for details.

githalytics.com alpha