ZopeSkel addon proposal

Martin Aspeli optilude at gmx.net
Mon Nov 26 14:19:24 UTC 2007


Tarek Ziadé wrote:
> Hi all,
> 
> We have created a few templates on the top of ZopeSkel here to be able to do
> micro-templating in our Plone Products. The idea is to be able for example
> to inject a new archetype content type in an existing plone 3 product, with
> the paster. The missing feature was to be able to modify existing files in
> the product, such as the profile (types.xml, profiles.zcml, etc..) or in the
> interfaces.
> 
> So what we have now is the ability to call the paster like this:
> 
> $ paster create -t plone my.product
> $ cd my.product
> $ paster create -t archetype MyContent
> $ paster create -t archetype MyOtherContent
> 
> The template makes diffs using difflib (see
> https://ingeniweb.svn.sourceforge.net/svnroot/ingeniweb/IngeniSkel/trunk/ingeniskel/addon.py)
> and inject the new content. It's up to the developer to check upon the merge
> made in the code before commiting it. We're planning to do the same for
> portlets, and other elements that can be added in a product.
> 
> I'd like to propose such a feature in ZopeSkel if you guys think it worth
> it. (adding a content type
> is still a lot of boiler plate code indeed)

First of all, ZopeSkel is just a collection of templates for Paste 
Script. It doesn't really have much behaviour.

Secondly, what you're describing should be done with local commands. See:

http://martinaspeli.net/articles/a-cool-project-if-you-have-the-time

for the idea and

http://www.mustap.com/pythonzone_post_234_zopeskel-with-local-commands

for the initial implementation.

I'd be really great to get some more momentum behind this. I'd love to 
have the ability to just go: "paster archetype MyType" inside an egg and 
have a new AT appear. :)

Martin

-- 
Author of `Professional Plone Development`, a book for developers who
want to work with Plone. See http://martinaspeli.net/plone-book





More information about the Product-Developers mailing list