#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
Encoding.default_external = 'utf-8'
require 'roo'

ARGV.each do |f|
  csvfile = (f+".csv").sub(/\.ods/i, "")
  open(csvfile, "w"){|c| c.write(Roo::OpenOffice.new(f).to_csv)}
end
