FTP automangling file extension: semi-working proof-of-concept
Hi Joel I've also toyed with ideas related to this, though I wasn't looking at the file extension -- since my editor is Vim, not DreamWeaver. (When I have to work with designers who use DW, I just use ids that end in '.htm'.) My dream was rather to extend the "data block" parsing that Zope does when passing objects in and out via FTP or WebDAV. Specifically, Python scripts arrive looking like this: ## Script (Python) "formatContentLayer" ##bind container=container ##bind context=context ##bind namespace= ##bind script=script ##bind subpath=traverse_subpath ##parameters=page_id ##title= ## ''' Enumerates the positioning of the content <div>s and the backgrounds. ''' I'd love it if I could create new objects on the filesystem, and have Zope create them in the ZODB when I upload. The data block for a DTML method might look like: ## DTML Method "sendMail" ##title= ## <dtml-comment> .. and so on Zope should look for a factory for the meta-type on the first line, and create the object if successful, or fail to upload if unsuccessful. To accommodate non-Zope-aware FTP- and WebDAVing, this behaviour should happen on ports of their own .. eg. localhost:8021 for normal FTP and localhost:8121 for superFTP? (I suspect I'm drifting in the direction of something like FlareLang http://flarelang.sourceforge.net/prog-overview.html here, with the objects represented as XML on the filesystem. That might mean something like: <object> <meta_type>Script (Python)</meta_type> <id>formatContentLayer</id> <bindings> <binding>container <binds>container</binds> </binding> <binding>namespace </binding> ... </bindings> <parameters> <parameter>page_id</parameter> </parameters> <title></title> <body> ''' Enumerates the positioning of the content <div>s and the backgrounds. ''' ... </body> </object> ) Regards, Jean
On Mon, 30 Jul 2001, Jean Jordaan wrote:
I've also toyed with ideas related to this, though I wasn't looking at the file extension -- since my editor is Vim, not DreamWeaver. (When I have to work with designers who use DW, I just use ids that end in '.htm'.)
Jean -- The connection w/Flare is interesting. I'm going to try learn more about this and post some thought soon. As a general point, you certainly can name objects '_.htm'; however, this is so anti-Zope in my mind. Often, a web page will start as a single DTML document, such as "prices" /site/ Folder prices DTMLDoc but within a few months, I might have several supporting ZSQL methods that find prices, display prices, etc. What usually happens is that I'll turn prices into a folder and make its index_html the old "prices", as such: /site/ Folder prices/ Folder index_html DTMLDoc get_prices ZSQL ... I could change all my links from "/site/prices.htm" to "/site/prices/index.htm", but this can be a pain, and there's a lapse until search engines and bookmarks catch up. Having a folder named "prices.htm" seems like a bad idea. In my mind, naming a zope object w/o an extension is the best idea. It's just difficult to edit. -- Joel Burton <jburton@scw.org> Director of Information Systems, Support Center of Washington
Hi Joel
The connection w/Flare is interesting. I'm going to try learn more about this and post some thought soon.
I'm glad you think so :) Mainly I really like the included meta-data in Python scripts on the filesystem, but the commented data-block is rather fragile and ad hoc. Flare seemed like a good starting point for thought on formalization.
As a general point, you certainly can name objects '_.htm'; however, this is so anti-Zope in my mind.
I entirely agree, and wouldn't like to extend the '_.htm'-naming beyond the involvement of the "DreamWeaver team".
naming a zope object w/o an extension is the best idea. It's just difficult to edit.
It also makes one use "folder['name.htm']" instead of "folder.name" in Python, which is almost as bad as "_['sequence-item']"! Jean
participants (2)
-
Jean Jordaan -
Joel Burton