Skip to content

Commit

Permalink
docs, plugin stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
ssoroka committed Nov 12, 2008
1 parent aae2db6 commit 8edf245
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
34 changes: 34 additions & 0 deletions README.rdoc
@@ -1,2 +1,36 @@
= ANSI

== DESCRIPTION

Use ANSI codes in printed output, including colors and controlling the cursor, clearing the line, and clearing the screen.

== INSTALLATION

as a gem:
sudo gem install ssoroka-ruby

as a plugin:
script/plugin install git://github.com/ssoroka/ansi.git

== USAGE

1) Simply control the cursor:
>> puts "HELLO" + ANSI.right(30) + "THERE!"
HELLO THERE!

2) use colors:

>> puts ANSI.color(:red) { "hello there" }
>> puts ANSI.color(:green) + "Everything is green now" + ANSI.no_color

3) loops:

printf ANSI.clear_screen
puts "Processing users..."
max = User.count
User.all.each_with_index {|user, index|
user.update_something!
printf ANSI.left(50) + "Processed #{index}/#{max} users..."
}
puts " done!"

2 changes: 1 addition & 1 deletion ansi.gemspec
Expand Up @@ -8,7 +8,7 @@ Gem::Specification.new do |s|
s.description = %q{Use ANSI codes in printed output, including colors and controlling the cursor, clearing the line, and clearing the screen.}
s.email = %q{ssoroka78@gmail.com}
s.extra_rdoc_files = ["lib/ansi.rb", "README.rdoc"]
s.files = ["ansi.gemspec", "lib/ansi.rb", "Manifest", "Rakefile", "README.rdoc", "test/ansi_test.rb"]
s.files = ["ansi.gemspec", "init.rb", "lib/ansi.rb", "Manifest", "Rakefile", "README.rdoc", "test/ansi_test.rb"]
s.has_rdoc = true
s.homepage = %q{http://github.com/ssoroka/ansi}
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Ansi", "--main", "README.rdoc"]
Expand Down

0 comments on commit 8edf245

Please sign in to comment.