Just a suggestion... If your running on *nix, you may want to look at using htmldoc as a middle-man. It'll get html and render it into a postscript file or jpeg ( or other format). bobb ----- Original Message ----- From: "Samir Mishra" <SamirMishra@cbuae.gov.ae> To: <zope@zope.org> Sent: Tuesday, January 20, 2004 12:53 AM Subject: [Zope] External Method Help - Rendered HTML to Disk
Hello All,
I'm experiencing a mental block on this, hoping someone can help with some pointers, resources to get me started on the right path.
I'd like to have a generic DTML method (or preferably a python script), call it write2FS, that can be called as, e.g.
http://my-zope-site//somefolder/index_html/write2FS?filename=somepath%2Fsome
file
and this will create a file called {ZOPEPATH}/var/somepath/somefile.html containing the rendered version of index_html. Optionally,
1. if a filename is not supplied to the method above, the script/method will render & write index_html to file {ZOPEPATH}/var/someFolder/index_html.html.
2. if the method is invoked as
http://my-zope-site//someFolder/index_html/write2FS?filename=somepath%2Fsome
file&link=someOtherFolder%2FZopeObj it will write a file named {ZOPEPATH}/var/somepath/somefile.html containing the rendered elements of http://my-zope-site//someOtherFolder/ZopeObj
I hope the above is intelligible.
My motivation for the above is that I'm dealing with a lot of dynamic financial time series data, up to a point. Once the data is published, e.g. at the end of a week/month, it is static. Therefore, instead of performing a DB query each time a report is requested, I'd like to save the canned reports as static pages once data is published and have apache handle them.
Later, perhaps I'll consider saving the reports in a DB as text BLOBs.
Thanks in advance.
Samir.
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )