[ANN] ruport-util 0.7.0 : csv2ods and other fun stuff

G

Gregory Brown

== What is it?

ruport-util provides a home for marooned former parts of Ruby Reports,
and newer fringe ideas.

== Examples of new stuff

## csv2ods and Ruport::Formatter::ODS

ruport-util now comes with a tool called csv2ods which will convert a
csv file to an OpenDocument spreadsheet file. You do not need
OpenOffice.org installed to use this tool.

-- usage:

csv2ods my.csv my.ods

This is simply implemented as a Ruport table formatter, so you can use
it programatically, too.

For example, if you're reporting against an ActiveRecord model

class MyModel
acts_as_reportable
end

MyModel.report_table:)all,:conditions => ["name = ?", "Fat Louie"]).to_ods

## Streamlined Report class

Our report runner has been simplified and many dumb features were cut out of it.

One cool new feature is implicit file type handling:

#------
class MyReport < Ruport::Report

renders_as_table

attr_accessor :file

def renderable_data
t = Table(file)
t.sub_table { |r| r.a == "foo" }
end

end

MyReport.generate do |report|
report.file = "in.csv"
report.save_as "out.csv" # renders to csv
report.save_as "out.pdf" # renders to pdf
puts report.to_text # renders to screen as text
end
#-----

rope has been updated to generate the new Report definitions.

== Getting Ruport

To use ruport-util, you'll need Ruport >= 0.12.0

sudo gem install ruport -y

== Installing ruport-util

It's on RubyForge:

gem install ruport-util -y

== Using

require "ruport"
require "ruport/util"

# then just use whatever tools you want.

== Full Feature List as of 2007.06.07:

* Basic Graphing (util/graph)
* Report runner (util/report)
* Report Mailing (util/mailer)
* Report Manager (util/report_manager)
* Invoices (util/invoice)
* PDF form helpers (util/pdf/form)
* ODS formatter for tables (util/ods)
* Benchmarking Tool (util/bench)
* Ruport centric code generation via the rope command.
* csv to OpenDocument conversion via csv2ods

See example/ for more information

== Help?

This code is unstable, evil, and possibly buggy until further notice.

Please report any problems on the Ruport mailing list:
http://list.rubyreports.org
 
G

Gregory Brown

I forgot to mention: Many thanks to manveru for joining the Ruport
core team and adding in all the ODS stuff!

(He also converted all our ruport-util tests to specs, so double thanks!)
 
G

Gregory Brown

Turns out I forgot to add the dependency for rubyzip to the gemspec.
Just added it and did an 0.7.1 release.

you can of course, do a manual gem install rubyzip if you'd like.

-greg
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top