collective / collective.transmogrifier

A configurable pipeline, aimed at transforming content for import and export
Other
5 stars 8 forks source link

Standard way to accumulate information during processing #6

Open tobiasherp opened 9 years ago

tobiasherp commented 9 years ago

We should have a standard way to collect information during the pipeline processing; e.g., when creating a tarball as an export_context (quintagroup.transmogrifier.writer), there is - correct me if I'm wrong - no way to access the resulting tarball in the end, or in later parts of the pipeline. (The GenericSetup creates the TarballExportContext itself). If there was, we could easily build user interfaces to create tarball exports from a Plone site, e.g. of a specified subtree and all referenced ressources.

As a first shot, my idea is to have an _collected_info attribute (a list); this could take dictionaries with keys for the category (e.g. export_context), section (the name), and info (for export contexts, this could e.g. be a dict with context_type and context keys).

The info could be added with an add_info method, and a get_info method could return a list (optionally filtered by category and/or section).