On Jan 31, 2005, at 5:37 PM, Mike Lesser wrote:
I want to crunch up some data from either text files or a MySQL database, and make attractive output. It's mostly boxes and plain text, like a chart. But what's the easiest/simplest way to go? This is for single-user, Panther, non-critical.
Hi Mike,
I think you should take a look at outputting to an HTML document. Perl has lots of tools for this and you can make graphs in a variety of ways. Simple bar graphs can be made by resizing a 1x1 pixel gif image and placing it and labels in a table.
Or, for more complex graphs, I've used GDGraph.pm (I think that's the name) and it worked great too. If I recall, it does pie charts, bar and line charts and maybe some others too.
Sherm Pendley's "Fat Camel" and "GraphicsKit" has most of what you need to create images on the fly with perl, so you may want to take a look at that too.
You can always print the html doc to a PDF file using the standard "Print" command and it would seem to me that you should be able to print a saved document to PDF with a perl only solution, but I've never tried. If not, you should be able to find an AppleScript that can batch print a folder or list of documents that can be called from a perl script.
Have fun!!
--
Bill S.