Ruby's very basic wrapper for gnumeric’s ssconvert binary
Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
script
spec
tasks
History.txt
Manifest.txt
PostInstall.txt
README.rdoc
Rakefile
anyss.gemspec

README.rdoc

anyss

DESCRIPTION:

Anyss is a very basic wrapper for gnumeric's ssconvert binary.

FEATURES:

  • conversion of *.ods, *.gnumeric & *.xls to csv file

  • supports overriding of insensible file extension

  • iteration through each row of the spreadsheet, or returning a string reader

PROBLEMS:

  • only works with system with newer versions of gnumeric that provides the ssconvert binary (testings done on gnumeric-1.8.3)

SYNOPSIS:

require 'anyss'

# converting *.ods, *.gnumeric or *.xls to *.csv
in, out = %w( plants.ods plants.csv )
Anyss.to_csv( in, out ) # generates 'plants.csv' from 'plants.ods'
Anyss.to_csv( in )      # generates 'plants.ods.csv' from 'plants.ods'

# applies strategy to each row in *.ods, *.gnumeric, *.xls or *.csv
Anyss('fruits.ods') do |row|
  name, color, smell = row
  puts "The color of #{name} is #{color}, and it smells like #{smell} !!"
end

# returns instance of Anyss::StringReader
reader = Anyss('fruits.ods')  
reader.each { |row| ... }

# overriding insensible file extension, and generating 'plants.foo.csv' 
# from 'plants.foo'
Anyss.to_csv( 'plants.foo', :type => :ods ) 
Anyss( 'fruits.foo', :type => :ods ) { |row| ... }

REQUIREMENTS:

  • ruby 1.8

  • session gem

INSTALL:

  • git-clone git://github.com/ngty/anyss.git

  • rake install_gem

LICENSE:

(The MIT License)

Copyright © 2008:

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.