#!/usr/bin/env ruby lib = File.expand_path('../../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'shell2html' if ARGV.count > 0 file = ARGV[0] if !File.exists? file puts "File #{file} Not found" exit(1) end puts Shell2html.to_html(File.read(file)) else txt = $stdin.read puts Shell2html.to_html(txt) end