Welcome to Documatic
Documatic is an OpenDocument template-driven formatter for Ruport. You can edit the layout of your reports in OpenOffice.org, embedding Ruby code to control the presentation of your data. It can be used to produce attractive printable documents such as database reports, invoices, letters, faxes and more.
As of version 0.1.0, Documatic supports OpenDocument text and spreadsheet formats.
Installation
Documatic can be installed via Rubygems.
% gem install documatic
The current version is 0.2.0, released on 26 April 2008.
Usage
You can load Documatic as a gem when your program is initialised:
require 'rubygems' require 'documatic'
Documatic will then be available as a formatter for your Ruport tables, groups and groupings. Rendering using an OpenDocument text template is done like this:
data.to_odt_template(:template_file => 'path/filename.odt',
:output_file => 'output-path/filename.odt')
Rendering using an OpenDocument spreadsheet is done like this:
data.to_ods_template(:template_file => 'path/filename.ods',
:output_file => 'output-path/filename.ods')
Documatic creates the output path if required.
Tutorial
The DocumaticTutorial is a good place to start. It demonstrates the basics of how Documatic works.
Examples
More DocumaticExamples are available. They illustrate a range of tasks you can perform with Documatic.
How it Works
So exactly how does Documatic work? What are those funny-coloured character styles in the examples? How does Documatic know that it's supposed to automatically remove table rows that only contain code?
Why do I keep asking rhetorical questions?
HowItWorks explains how Documatic's templating system works. This is a must-read if you want to start developing your own templates.
API Documentation
You can view the API documentation for Documatic by running gem_server then browsing to http://localhost:8808. The API docs aren't complete yet, but they contain some useful information.
Support
Please contact the Ruport mailing list at http://groups.google.com/group/ruby-reports for support or to discuss Documatic in general.
Other enquiries can be directed to the Documatic maintainer, Dave Nelson (urbanus at 240gl dot org).
