readme.md in casperreports-0.0.4 vs readme.md in casperreports-0.1.0
- old
+ new
@@ -1,39 +1,48 @@
-# Casper
+# CasperReports
-(Still in Development Mode...)
+V 0.1.0
-Is a jruby library that takes a jrxml document, a xmldocument, and a xpath selection string, to create a pdf report.
+Casper wraps a jRuby sheet over the jasper reporting engineto make it
+more ruby friendly. Just like your friendly ghost :-)
+
# Requirements
This gem requires jruby > 1.6.0
# Install
``` ruby
gem install casperreports
```
-# Input
+# Input Paramters
-* JasperReport Template or jrxml file
-* Xml Data
-* XPath Selection
-* Document type ['pdf','xls']
+* JasperReport Template or jrxml file (String of XML)
+* Xml Data (String of XML)
+* XPath Selection (String)
+* Type ('pdf','xls')
-# Process
+# How does it work?
-Casper will use the JasperReports library to compile and return a pdf.
+Casper will use the JasperReports library to take the two xml documents
+along with the filter string to build a jasper report return the report
+as a pdf or xls, based on the type parameter.
# Output
A pdf document in string of bytes
# Usage Examples
+``` ruby
+
+require 'casper_reports'
+
movie_jrxml = open('moviereport.jrxml').read
movies = open('movies.xml').read
-pdf_string = Casper.new.compile(movie_jrxml, movies, '//movie', 'pdf')
+pdf_string = Casper.new.compile(movie_jrxml, movies, '//movie')
open('movie.pdf', 'wb').write(pdf_string)
+```