Changes between Version 1 and Version 2 of quintagroup.transmogrifier/howto
- Timestamp:
- Dec 28, 2010 2:52:31 PM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
quintagroup.transmogrifier/howto
v1 v2 55 55 You probably only need to do this if the workflow you want to abandon is not installed on the new site (and you don't want to install it). Otherwise use the types tool in site setup which does a much better job. 56 56 57 * product: quintagroup.transmogrifier 58 * section blueprint: quintagroup.transmogrifier.datacorrector 57 * section blueprint: quintagroup.transmogrifier.datacorrector 59 58 60 59 With this method, you actually rewrite the xml that is generated by Marshall and packaged up as part of the content pipeline item. You'll need to write an adapter for this (up to you whether you do this as an export or import step) - which is complicated enough to need a page of instructions of its own. 61 ... apply a workflow transition62 60 63 * product: plone.app.transmogrifier 64 * section blueprint: plone.app.transmogrifier.workflowupdater 61 == ... migrate content from one content type to another == 65 62 66 ... migrate content from one content type to another67 63 68 64 If this is a one-off migration, then you might want to consider your options - with just a few items to migrate you may want to think about cutting and pasting, or digging out your regular expressions to manually search and replace the xml files in between the export and import. … … 74 70 Quintagroup themselves have written a couple of products undertaking specific migrations, so these give you a good idea of what you need to do. It seems to me the trick is understanding what information is conveyed by the key value pairs comprising the content pipeline item and the xml that's packaged up with the pipeline item. It's certainly possible to replace the value of a key in the pipeline item - but that probably wouldn't be enough to migrate content where fields have different names etc. 75 71 72 {{{ 76 73 [substitution] 77 74 … … 83 80 84 81 PloneFormMailer = FormFolder 85 86 .... import a CSV file 87 88 * product: collective.transmogrifier 89 * blueprint: collective.transmogrifier.sections.csvsource 90 91 If you can edit your csv file beforehand, then just make sure that your column names map to the field names of your content type. To get this to work, you'll need three things: 92 93 * _type 94 * _path 95 * the path actually to exist in your site before you import (e.g. if you're planning to import all your items to a folder called datasets, then you need to have created that) 96 97 [csvsource] 98 blueprint = collective.transmogrifier.sections.csvsource 99 filename = /Users/abowtell/Documents/buildingcapacity/testdatasets.csv 100 .... adding _type and _path to your csv file 101 102 You can add these as columns to your spreadsheet or just insert them into the content pipeline item: 103 104 [itemType] 105 106 blueprint = collective.transmogrifier.sections.inserter 107 108 key = string:_type 109 110 value = string:Dataset 111 112 ... convert a string of comma separated keywords in your csv file into a python list 113 114 [keywords] 115 116 blueprint = collective.transmogrifier.sections.inserter 117 118 key = string:keywords 119 120 value = python:item['keywords'].split(",") 121 122 123 ... take a whole load of flat HTML files and turn them into a Plone site 124 125 Well I haven't tried this yet, but there's a project, originally called Funnelweb, which has created a series of blueprints to trawl and convert HTML files to turn into transmogrifier items for insertion into Plone. Search for transmogrify on Pypi. 82 }}}