[Product-Developers] Calling all collective.transmogrifier blueprint authors

Alex Clark aclark at aclark.net
Fri Mar 25 15:03:14 UTC 2011


Hi all,


I've been working with Dylan Jay on mr.migrator: a command line way to 
execute transmogrifier pipelines, and we now have a working demo:

- https://github.com/aclark4life/mr_migrator_demo

To run it yourself, try this:

$ git clone git at github.com:aclark4life/mr_migrator_demo.git
$ cd mr_migrator_demo
$ python2.6 bootstrap.py -d
$ bin/buildout
$ bin/plone start

Now create a Plone site called "Plone" TTW, and then:

$ bin/mr.migrator

At which point you will see a bunch of stuff:

---
...
WARNING:upload:Failuire while creating 
'http://admin:admin@localhost:8080/platea' of type 'Folder'
INFO:upload:/platea Created with type=Folder
Level 1:logger:/platea
WARNING:upload:Failuire while creating 
'http://admin:admin@localhost:8080/tortor' of type 'Folder'
INFO:upload:/tortor Created with type=Folder
Level 1:logger:/tortor
WARNING:upload:Failuire while creating 
'http://admin:admin@localhost:8080/index.html' of type 'Document'
INFO:upload:/index.html Created with type=Document
Level 1:logger:/index.html
WARNING:upload:Failuire while creating 
'http://admin:admin@localhost:8080/ad/index.html' of type 'Document'
INFO:upload:/ad/index.html Created with type=Document
Level 1:logger:/ad/index.html
...
---

And if you check the site again you'll see content in your site (more or 
less; I'm still working on it.)

So, now I'm writing this email to:

- Share the news of command-line driven transmogrification: it's coming!

and:

- Ask for feedback on the issue of making collective.transmogrifier 
listen for a "transmogrify" target, coming from blueprints who add an 
entry point like:

setup(
     ...

     entry_points="""
     [z3c.autoinclude.plugin]
     target = transmogrify
     """
)


That would allow a buildout[1] like this to work:



[mr.migrator]
recipe = mr.migrator
pipeline = pipeline.cfg
eggs =
     transmogrify.filesystem
     transmogrify.ploneremote
     transmogrify.pathsorter
     transmogrify.printer


Otherwise, we'll need to make mr.migrator accept the ZCML parameter, and 
end users will have to list their blueprints twice:



[mr.migrator]
recipe = mr.migrator
pipeline = pipeline.cfg
eggs =
     transmogrify.filesystem
     transmogrify.ploneremote
     transmogrify.pathsorter
     transmogrify.printer
zcml =
     transmogrify.filesystem
     transmogrify.ploneremote
     transmogrify.pathsorter
     transmogrify.printer


This only works now (without the zcml=) because I have created branches 
of collective.transmogrify and transmogrify.filesystem where I added the 
includePlugins ZCML:

- 
http://svn.plone.org/svn/collective/collective.transmogrifier/branches/aclark-mr-migrator-compat/src/collective/transmogrifier/configure.zcml


and the transmogrify entry point:

- 
https://svn.plone.org/svn/collective/transmogrify.filesystem/branches/aclark-mr-migrator-compat/setup.py

So what do you product developers think? Do you care at all? Personally, 
I don't want to:

a. Enter zcml= in my buildout.cfgs
b. Write the code to make it work in mr.migrator.

But that's just me.

As MJ has cautioned, we need to be careful about using z3c.autoinclude 
because it goes a bit nuts scanning files on the file system (which is 
why I have it tied to that zcml:condition currently).


Thoughts appreciated!


Thanks,


Alex



[1] https://github.com/aclark4life/mr_migrator_demo/blob/master/buildout.cfg


-- 
Alex Clark · http://aclark.net/help-me-help-plone




More information about the Product-Developers mailing list