Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Convert ANSI escape sequences to styleable HTML markup
Ruby
Branch: master
Pull request Compare This branch is 2 commits behind aslakhellesoy:master.

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
bin
examples
lib/ansi2html
spec/ansi2html
.gitignore
.rspec
.rvmrc
COPYING
Gemfile
History.txt
README.rdoc
Rakefile
ansi2html.gemspec
npm_install_express.txt

README.rdoc

ansi2html

You have class. You are a hipster. You ride a fixie bike to work and you are member of a Scotch Whisky club. When using a computer, you prefer minimalistic command line applications that output ANSI colours in your terminal that you have configured to have semi-transparent background with Frank Zappa background music and vim-like shortcuts that differentiates you from the common programmers. You are a big fish in a small pond.

Your friends are not geeks like you, they have more important goals in their lives, but they admire you for being so smart, because you can write computer programs. Programs with ANSI colours even. And yet, they don't know how to use a terminal.

You need a way to show your entourage the true power of ANSI colours. -A way that works with the iPad.

You will just

gem install ansi2html
curl github.com/aslakhellesoy/ansi2html/raw/master/examples/summering_feil.txt | ansi2html --envelope > summering_feil.html
open summering_feil.html

OMG you have a LINUX machine so you will do {TODO WTF is the equivalent of open in LINUX} to open the file. ZOMFG you have WINDOWS. You'll figure out what to do. It works the same as a .htm file.

HTML designers have a special option. Don't use –envelope. This will give you HTML with Scandinavian design instead. Just pump input in and stick the output in your new fancy <article> and <section> fancy page with CSS3 yo. (It will explode if you have rounded corners). Nobody does that anymore. Please.

Let's tweet #ansi2html with links to pages that have ANSI in HTML now, ok? (I would, but my home page is under construction, besides I don't promote my own art because I am an artist).

HALP

Send me a pull request if you fixed something. This will get you started (after you install ruby):

gem install bundler && bundle install && rspec spec
Something went wrong with that request. Please try again.