On 17/11/2010, at 11:53 AM, Alex Clark wrote:

> On 11/16/10 7:13 PM, Dylan Jay wrote:
>>
>> On 17/11/2010, at 9:54 AM, Alex Clark wrote:
>>
>>> On 11/16/10 5:31 PM, Dylan Jay wrote:
>>>>
>>>>
>>>> One thing also that might not be obvious is that bin/funnelweb as a
>>>> script should work with any arbitrary transmogrifier pipeline, e.g.
>>>>
>>>>
>>>> [funnelweb]
>>>> recipe = funnelweb
>>>> eggs = myblueprintpackage
>>>> pipeline = pipeline.cfg
>>>>
>>>
>>> Yes! I'm counting on using this.
>>
>> actually I've just realised this won't work either without your
>> blueprints having this special entry autoinclude entry
>> point.
>>
>>        entry_points="""
>>              [z3c.autoinclude.plugin]
>>              target = transmogrify
>>              """,
>>              )
>>
>> I introduced that autoinclude entry point so that I didn't have to
>> hard code the blueprint configure.zcml into funnelweb but as far as I
>> know, no one else uses it. I might have to support some kind of zcml-
>> slug kind of option like zope2instance :(
>
>
> FWIW, I like the "target = transmogrify" pattern; I just discussed  
> this
> briefly w/MJ (specifically wrt to how c.transmogrifier should not be
> auto including itself anywhere i.e. Plone)
>
>
> If I could create a blueprint package (with auto include
> target=transmogrify) and then do something like this:
>
> [buildout]
> parts += funnelweb
>
> [funnelweb]
> recipe = funnelweb
> eggs = transmogrifier.aclark_do_stuff
>
>
> And then do:
>
> $ bin/funnelweb --pipeline=foo.cfg (which has t.aclark_do_stuff in  
> the pipe)
>
> Then I'd be pretty happy.

yes that will work with the latest from the repo.

(unless your blueprint accesses plone apis directly. Hense why we used  
the transmogry.ploneremote blueprints which use xmlrpc).


>
>
> Or maybe I just load transmogrifier.aclark_do_stuff in the Plone
> instance eggs section.

you can but you'd still need to execute a script inside plone with  
something like the following in it

     context = Context()
     configuration_registry.registerConfiguration(
         u'transmogrify.config.funnelweb',
         u"",
         u'', "pipeline.cfg")

     transmogrifier = Transmogrifier(context)

     transmogrifier(u'transmogrify.config.funnelweb')

but that's all in the transmogrifier docs.

>
>
> But what is important (I think) is that funnelweb brings in
> c.transmogrifier and my blueprint (and all blueprints, maybe,
> eventually) register themselves.
>
>
> In typing that, it sounds a bit "heavy" in terms of what to make
> c.transmogrifier be responsible for (it's "just" a framework).
>
>
> Maybe the entry point should be: target=funnelweb and then funnelweb
> will make those blueprints available to c.transmogrifier?

Not sure what you mean. funnelweb is the one called zc3.autoinclude so  
it is the one registering the blueprints. Transmogrifier doesn't do  
that for you. I just choose "transmogrify" as the name since  
previously I was writing a generic runner for any pipeline in  
transmogrify.htmltesting. Funnelweb is still a generic runner but just  
happens to come with a pre-included pipeline and documentation.  I  
don't mind changing the target name if it makes sense to.

_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers

Reply via email to