Just run:
$ ruby csvtohtml.rb data.csv > table.html
You can customize the table's id, table's classes, header's classes and field's classes. You can also use linux pipes and it's only one small file long with NO dependencies.
require 'find' | |
BLACKLIST = %w[ | |
.git | |
.gitignore | |
Rakefile | |
] | |
task :default do | |
Find.find('.') do |path| |
# In development mode, optionally perform a RubyProf profile of any request. | |
# Simply pass perform_profile=true in your params. | |
def perform_profile | |
return yield unless params[:perform_profile] | |
require 'ruby-prof' | |
RubyProf.start | |
yield | |
result = RubyProf.stop | |
printer = RubyProf::FlatPrinter.new(result) | |
File.open("#{Rails.root}/tmp/profile.txt", 'w+') do |f| |
require 'rubygems' | |
fetcher = Gem::SpecFetcher.fetcher | |
my_dep = 'activesupport' | |
# 1st arg = all (true to get all versions, false to get latest) | |
# 2nd arg = prerelase (true to get pre-release gems, false to get stable) | |
all_gems = fetcher.list(false, false) |
if Rails.env.development? | |
around_filter :perform_profile | |
end | |
# In development mode, optionally perform a RubyProf profile of any request. | |
# Simply pass perform_profile=true in your params. | |
def perform_profile | |
return yield unless params[:perform_profile] | |
require 'ruby-prof' | |
RubyProf.start |
" Author: Susan Potter | |
" Using ~/.vim/supo as placeholder initialization VimScripts location. | |
" Didn't want to use ~/.vim/init in case init had or starts to have special meaning for Vim plugins or loading. | |
source $HOME/.vim/supo/global.vim | |
source $HOME/.vim/supo/functions.vim |