#!/usr/bin/env ruby require "cgi" cgi = CGI.new puts "Content-Type: text/html" puts "" # HTML structure divider = "
\n\n" html_head = <<-EOF guitar tab quick ref EOF html_header = <<-EOF

guitar tab quick ref :D

EOF # display HTML content puts "
" puts "#{html_head}" puts "#{html_header}" files = Dir["/home/kat/Documents/Git/-mine/tabref/tabs/*.txt"].each do |tab| fname = "#{File.basename(tab)}" fcontent = "#{File.read(tab)}" html_body = <<-EOF

"#{fname}" (link)

"#{fcontent}"

EOF puts "#{html_body}" end puts "
"