[Zope] Re: [ZGotW] Issue #4 (Closed) - but raising new questions ....

Tres Seaver tseaver@palladion.com
Fri, 18 Feb 2000 11:17:13 -0600


rgines@purina.com wrote:
> 
> As this list is good at doing, answering one question raises 47 others.
> 
> Here is a thought provoking question.  I'm curious as to what the group
> think in this list would come up with.
> 
> Here's the requirements in bullet for (for ease of reading and commenting).
> 
> 1)   Client wants to be able o publish to the web AND paper (please notice
> this is a 'client' request no mine <g>)
> 
> 2)   The source of the document must be able to be maintained in an
> application that is well known within the client organization ... hmmm ...
> maybe 'Word'!? <mute on> grumble choke cough etc. etc. <mute off>
> 
> 3)   Client wants all documentation to be able to fit within the existing
> look and feel for the site etc. etc
> 
> 4)   Client wants this task automated to the point where the ZGotW does not
> need to be called to handle.
> 
> ZGotW Issue #4 brought up some decent ideas that would take care of pieces
> of this.
> 
> I've got an idea, but although I know networking very well, am currently
> rising up the ranks of Zen Zope, and have a decent understanding of the
> inner workings of the HTML inner-workings ... alas <shame mode on> I am not
> very good at all with Python <shame mode off>.
> 
> Here's the thought provoking question ....
> 
> How difficult would it be to allow a user to upload an HTML file created
> from MS-Word (or some other tool which created HTML> either through a Zope
> form or WebDav, but have the file immediately upon hitting the save button,
> be parsed by a Python snippet which would remove the opening and closing
> HTML strings (which are covered by our standard_html_header and
> standard_html_footer methods).   This should be able to handle the best of
> both worlds.
> 
> Unfortunately, I do not know enough Python at this time to dive into this.
> I'm curious to hear if someone thinks that this is doable or if I am
> totally off my rocker ... (of course it is possible that both are true).
> 
> I look forward to your comments.

First, I have added your note as an "after-market" reply to the ZGotW#4.

Second, there is a command-line utility (loadsite.py, in the
$ZOPE_HOME/utilities directory) which already does the stripping you talk about
when loading HTML files into Zope from the local file system.  Extracting that
code for use in a PythonMethod should be very straightforward.  This technique
should work reasonably well for "one-way" migration (moving from Word to Zope),
but will be somewhat problematic trying to "round-trip", I think (Word may get
confused trying to open/browse/edit/save the document once it is in Zope).

Tres.
-- 
=========================================================
Tres Seaver         tseaver@palladion.com    713-523-6582
Palladion Software  http://www.palladion.com