Comments exporter and importer sections ======================================= Comments exporter and importer sections are used to migrate comments for site content. The comments exporter section blueprint name is ``quintagroup.transmogrifier.commentsexporter`` and importer section blueprint name is ``quintagroup.transmogrifier.commentsimporter``. Comments are represented in XML format. Both sections need relative path to the object with comments and importer also needs XML data for adding comments. Both sections has ``path-key`` option which specify key in item where path to object is stored (``_path`` is default) and ``files-key`` option that gives key where XML data will be or is stored. >>> import pprint >>> comments = """ ... [transmogrifier] ... pipeline = ... commentssource ... commentsexporter ... printer ... dataprinter ... commentsimporter ... ... [commentssource] ... blueprint = quintagroup.transmogrifier.tests.commentssource ... ... [commentsexporter] ... blueprint = quintagroup.transmogrifier.commentsexporter ... ... [printer] ... blueprint = collective.transmogrifier.sections.tests.pprinter ... ... [dataprinter] ... blueprint = quintagroup.transmogrifier.tests.dataprinter ... print = ... _files ... comments ... data ... ... [commentsimporter] ... blueprint = quintagroup.transmogrifier.commentsimporter ... """ >>> registerConfig(u'quintagroup.transmogrifier.tests.comments', comments) >>> transmogrifier(u'quintagroup.transmogrifier.tests.comments') # doctest: +ELLIPSIS, +REPORT_NDIFF {} {'_path': 'not/existing/bar'} {'_path': 'spam/eggs/notdiscussable'} {'_files': {'comments': {'data': ... 'name': '.comments.xml'}}, '_path': 'spam/eggs/foo'} ... creator date None comment to content creator date 1 reply to first comment creator date None other comment to content >>> pprint.pprint(plone._container) {'1': , '2': , '3': }