Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

pypm install mr.migrator

How to install mr.migrator

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install mr.migrator
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
1.0.1Never BuiltWhy not?
1.0b11 Available View build log
1.0b10 Available View build log
1.0b5 Failed View build log
1.0b4 Available View build log
1.0b1 Available View build log
Windows (64-bit)
1.0.1Never BuiltWhy not?
1.0b11 Available View build log
1.0b10 Available View build log
1.0b5 Failed View build log
1.0b4 Available View build log
1.0b1 Available View build log
Mac OS X (10.5+)
1.0.1Never BuiltWhy not?
1.0b11 Available View build log
1.0b10 Available View build log
1.0b5 Failed View build log
1.0b4 Available View build log
1.0b1 Available View build log
Linux (32-bit)
1.0.1 Available View build log
1.0 Available View build log
1.0b11 Available View build log
1.0b10 Available View build log
1.0b5 Failed View build log
1.0b4 Available View build log
1.0b1 Available View build log
Linux (64-bit)
1.0.1 Available View build log
1.0 Available View build log
1.0b11 Available View build log
1.0b10 Available View build log
1.0b5 Failed View build log
1.0b4 Available View build log
1.0b1 Available View build log
Lastest release
version 1.0.1 on Nov 28th, 2012

Mr.Migrator: Drive-by transmogrification made easy!

mr.migrator is a transmogrifier pipeline runner, either via the commandline or as a Plone add-on.


Transmogrifier is a powerful tool for creating transformation processes called "pipelines". Transmogrifier gives you the tools to create and share these pipelines but doesn't provide an easy way to run the pipeline. Mr.migrator aims to bridge that gap.

Mr.Migrator provides the following:

  • A buildout recipe with you can override a given pipeline and will also create a the commandline script to run the pipeline.
  • A commandline script with help which lets you run pipelines and see their progress. This is useful used in conjunction with transmogrify.ploneremote or other blueprints which don't need expect to be run inside the Plone process.
  • A Plone plugin which when installed lets you pick which pipeline you want to run, provides a form to override the pipeline options and then provides progress on the running pipeline. This is useful when you want to use plone.app.transmogrifier blueprints which expect to be run inside the Plone process.
Getting a pipeline

A pipeline is a concept from collective.transmogrifier where dictionary items pass there a series of steps, each adding, removing or uploading information to an external source. A pipeline is configured in configuration file using the INI style syntax. Mr.Migrator lets you run either pipelines you built yourself, or

Build your own pipeline

see collective.transmogrifer pipelines for more details.

Once you've created your pipeline .cfg you can use it on the commandline via

migrate --pipeline=mypipeline.cfg

or if installing via buildout

recipe = mr.migrator
pipeline = mypipeline.cfg

If you're using blueprints in your pipeline you will need to ensure that zcml configuration that registers them is executed. If you are using buildout you can use the following

parts += mr.migrator

recipe = mr.migrator
pipeline = mypipeline.cfg
eggs = transmogrify.sqlalchemy
zcml = transmogrify.sqlalchemy

This will ensure that the package that contains the blueprints is downloaded and the zcml for it is run before the pipeline is run so that the blueprints are registered.

If you aren't using buildout you can will need to tell the runner which packages to load zcml in via

migrate --zcml=transmogrify.sqlalchemy,transmogrify.other

If you the blueprint package includes the following entry_point you can skip the zcml settings above

entry-points = {"z3c.autoinclude.plugin":['target = transmogrify']}

There currently isn't a way to run a custom pipeline if using the Plone plugin. You will have to register it as below.

Using a Registered Pipeline

If a pipeline has been registered inside another package via zcml such as


    title="Example pipeline configuration"
    description="This is an example pipeline configuration"


and the package has an entry point that will enable the zcml to be loaded such as

entry_points = {"z3c.autoinclude.plugin":['target = transmogrify']}

Then you can get mr.migrator to run that pipeline via

migrate --pipeline=exampleconfig


recipe = mr.migrator
pipeline = exampleconfig

An example of a package which declares a pipeline designed to be overridden is funnelweb.

Overriding pipeline values

Pipelines are organised as a series of steps through which crawled items pass before eventually being uploaded. Each step as one or more configuration options so you can customise import process for your needs. Almost all imports will require some level of configurations.

The first part of each configuration key is the step e.g. crawler. The second part is the particular configuration option for that particular step. e.g. url. This is then followed by = and value or values.

The configuration options can either be given as part of the buildout part e.g.

parts += mr.migrator

recipe = mr.migrator

or the same option can be overridden via the command line

$> bin/migrate --crawler:url=http://www.whitehouse.gov

some options require multiple lines within a buildout part. These can be overridden via the commandline by repeating the same argument e.g.

$> bin/migrate --crawler:ignore=\.mp3 --crawler:ignore=\.pdf

You use the commandline help to view the list of available options

$> bin/migrate --help
Controlling Logging

You can show additional debug output on any particular set by setting a debug commandline switch. For instance to see see additional details about template matching failures

$> bin/mr.migrator --template1:debug
Working directly with transmogrifier (advanced)

You might need to insert further transformation steps for your particular conversion usecase. To do this, you can extend a plugins underlying transmogrifier pipeline. mr.migrator uses a transmogrifier pipeline to perform the needed transformations and all commandline and recipe options refer to options in the pipeline.

You can view pipeline and all its options via the following command

$> bin/mr.migrator --show-pipeline

You can also save this pipeline and customise it for your own needs

$> bin/mr.migrator --show-pipeline > pipeline.cfg
$> {edit} pipeline.cfg
$> bin/mr.migrator --pipeline=pipeline.cfg

Customising the pipeline allows you add your own personal transformations which haven't been pre-considered by the standard mr.migrator tool.

See transmogrifier documentation to see how to add your own blueprints or add blueprints that already exist to your custom pipeline.

Using external blueprints

If you have decided you need to customise your pipeline and you want to install transformation steps that use blueprints not already included in mr.migrator or transmogrifier, you can include them using the eggs option in a mr.migrator buildout part

recipe = mr.migrator
eggs = myblueprintpackage
pipeline = mypipeline.cfg

However, this only works if your blueprint package includes the following setuptools entrypoint in its setup.py

      target = transmogrify


Some transmogrifier blueprints assume they are running inside a Plone process such as those in plone.app.transmogrifier (see http://pypi.python.org/pypi/plone.app.transmogrifier). mr.migrator doesn't run inside a Plone process so these blueprints won't work. If you want upload content into Plone, you can instead use transmogrify.ploneremote which provides alternative implementations which will upload content remotely via XML-RPC. transmogrify.ploneremote is already included in funnelweb as it is what funnelweb's default pipeline uses.

Mr.Migrator in Plone

*under development*

Mr.Migrator needs to be combined with a package providing a registered pipeline.

  1. Install mr.migrator into your buildout
  2. Install a package providing your pipeline such as funnelweb or collective.jsonmigrator
  3. Go to the place in your site where you want to import content and select Actions > Mr.Migrate here
  4. Pick the pipeline you want from the drop down list
  5. A form for filling in extra configuration for your pipeline will displayed (either autogenerated from the .cfg or a form designed by the pipeline author)
  6. Click run
  7. Popup a progress feedback dialog with a log of activity
  • Finish autoform so works in all cases
  • combine argsparse and autoform code
  • do progress dialog
  • hook point for packages to register form along with pipeline
  • when no pipelines found: display help on where to find them and how to install them
  • Alex Clark - for the name
  • Rok Garbas - the original code for the z3cform
  • Dylan Jay - the original code of the commandline runner


  • "Dylan Jay", Author
  • "Alex Clark", Maintainer

Change history

1.0.1 (2012-09-18)
  • put back in manual zcml loading [djay]
1.0 (2012-04-28)
  • fix setup.py issue breaking buildout [djay]
  • fixed NameError: global name 'cparser' is not defined, issue #6 [gborelli]
  • fix default profile [toutpt]
  • fix import error [toutpt]
1.0b11 (2012-04-25)
  • support pipeline includes [djay]
1.0b10 (2012-01-23)
  • Revert portion of ec799dcd3d, causing ConfigurationErrors [aclark]
1.0b9 (2012-01-23)
  • Fix brown bag release (bad MANIFEST) [aclark]
1.0b8 (2012-01-23)
  • Fix brown bag release (missing zcml) [aclark]
1.0b7 (2012-01-23)
  • Look for pipeline.cfg in cwd [aclark]
1.0b6 (2012-01-23)
  • Fix brown bag release [aclark]
1.0b5 (2012-01-22)
  • Bug fix: support for --zcml arguments [aclark]
1.0b4 (2011-08-14)
  • Bug fix: ZCML config [aclark]
1.0b3 (2011-08-14)
  • Bug fix: ZCML config [aclark]
1.0b2 (2011-08-14)
  • Bug fix: Python 2.4 compat [aclark]
1.0b1 (2011-06-29)
  • allow way of running zcml for blueprint packages in commandline [djay]
  • split out commandline runner from funnelweb [djay]
  • add start of form for running transmogrifier inside plone [djay]

Subscribe to package updates

Last updated Nov 28th, 2012

Download Stats

Last month:1

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.