On Thu, May 24, 2001 at 04:02:49PM -0500, Steve Drees wrote:
Perhaps you could modify your dump command to get the meta type Write it out in a <dtml-comment></dtml-comment> And then dump the results of document_src() This wouldn't require a change to Zope. Just to ZShell
Of course I could do that in approximately 5 minutes. However the dump or even ZShell is not the problem, this was just a bad example. Say I edit some DTML Method from scratch with emacs (or any other tool which don't know anything about Zope), now I want to put it into the ZODB, but not using the zope's management interface, for example using ZShell's wget command or another yet to be released tool (or maybe FTP I don't know) Then during the upload, Zope can't decide automatically what the object meta type will be, and will make a guess which is bad in 50% of the cases: either it's a DTML Method, or it's a DTML Document, and both will be detected with a text/html mime type. talking about information redundancy, please explain why a Python Script contains it's meta type in a comment at its top ! It has no meaning to Zope, because you can't upload and use other types of Python source inside Zope (you don't upload products or external methods), and it has no meaning to Python or any text editor out there. That's why I think my suggestion is just as bad as this Python Script comment: Why don't you do it in DTML objects too ? (to push it further: uploading a structured text document, the mime type will be recognized as text/plain anyway, and the meta type will be File, I mean when not using the ZMI)
Then you could modify wget to make use of this comment when importing.
Again, it's a five minutes job to modify ZShell to do that, but I wanted a more general solution in order for everybody to be able to use it with non Zope-aware software. Hoping this clarifies what i want. bye, Jerome Alet