zlave
[email protected]
zlave was developed at the University of Bristol as part of the
"Write-enabled
Web
" project (funded under a
Learning & Teaching Award
). The architecture is summarised
here
. The left hand (Solaris side) is optional.
zlave was inspired by the work of Joe Nicholls and Phil Harris at UWCM
- they have a much purer, less brute force architecture (shown
here
).
The starting point for the zlave code was from
Python Programming on Win 32
by Mark Hammond & Andy Robinson.
We use these few scipts to do the following:
- Upload Office file to Unix Zope
- Send file to NT hosted Zope over XML-RPC
- Convert file to .html using Word/Powerpoint/Excel as a COM object
- Return .html (and associated images) to Unix Zope
If you combine some web forms and manage_* methods on the returned values,
the result is an 'Upload, Convert and Publish in One Fell Swoop' of
MS Office files on a Unix hosted Zope
This is crufty, old, unmaintained, no warranty, beginner python code. It works for me, but is
not an elegant (or in any way correct) way of doing things. You have been warned!
If you use, upgrade, develop or otherwise find this useful, or if you have any suggestions to make
about this document or the code, please do let me know.
I'm very interested to get feedback.
There are two external method modules - one at the NT end, one at the Unix end:
-
- Provides various functions for controlling Office2K from Zope/python
- Make sure you edit the 'home' variable so that files are placed
somewhere appropriate for your system!
- I use MS Filter to cleanup the garbage .html that MS produces.
I've left the code in, but commented it out as I presume most
people won't have it installed which leads to the system breaking
seemingly without reason. I also had a plan to use mxTidy as a COM object, but
never got around to it.
- It is designed for use over XML-RPC, so a lot of it probably of no interest
to you if you just want to be able to control Office from Zope
- It is only tested with Office2K and certainly doesn't work with Office97
- It is very crufty and probably full of inefficient, and perhaps dangerous code.
I'm making absolutely no promises about this code. If you use it and it breaks
things, don't blame me... but do let me know, coz I'd be interested to hear.
-
- Provides functions for conversion of the different Office file types
- Be sure to edit the 'zlave_url' variable to something appropriate for your setup!
- Be sure to edit the user/pass details in each function
- Install the xmlrpclibBasicAuth module somewhere appropriate. If you don't edit the
'import' command, you'll need to put it in <Your_Zope>lib/python/Shared/UoB/.
- Avert your eyes at the nasty manual error handling that I've used ;-). I don't claim
to be any kind of xml-rpc/Zope/python/win32com expert... this is just stuff that I got
to work.
|