Wire Stories Configuration
In order for
CUE
Zipline to support the import of wire stories from DC-X, you need to
add a dcx-converters
top-level section like this
to the
CUE
Zipline configuration file:
dcx-converters: # Configuration to convert DC-X wire story to CUE storyline in a container wire: # Relative path where templates for DC-X wire live # template-dir: /etc/cue/zipline/conversion-templates target: publications: - text: Tomorrow Online # Text to show in a label value: tomorrow-online # Name of the publication containers: - text: Regular News Story value: regular-news-story # Map between CUE container fields and DC-X document fields fields: - name: Headline meta: com.escenic.container.slug content-types: - text: Storyline value: storyline # Map between CUE content type fields and DC-X document fields fields: - name: Title meta: title # Map between CUE story element type fields and DC-X document fields story-elements: - value: headline # Name of the story element type fields: - name: Headline meta: headline - value: lead_text fields: - name: SubHeadline meta: lead-text extract-substrings: False # Attribute used to separate out a DC-X XHTML field value - value: paragraph fields: - name: body meta: paragraph extract-substrings: True binary-content-types: - text: Picture value: picture # Map between CUE binary content type fields and DC-X image fields fields: - name: ImageCaption meta: caption - name: _display_title meta: title summary-fields: # Binary content type summary fields - name: ImageCaption meta: caption - text: Binary value: binary fields: - name: _display_title meta: title summary-fields: - name: _display_title meta: title - text: Graphics value: graphics fields: - name: ImageCaption meta: caption - name: _display_title meta: title summary-fields: - name: ImageCaption meta: caption # Map between DC-X text formatters and CUE storyline annotations annotations: - name: bold # Name of the css class that DC-X uses to format a text in story meta: bold # Name of the annotation that CUE uses to annotate a text in storyline - name: italic meta: italic - name: underline meta: underline
The overall purpose of this section is to define:
-
Which CUE publications DC-X wire stories may be imported to
-
Which containers DC-X wire stories may be imported to
-
Mappings between DC-X fields and the fields / story elements in CUE containers and content types
-
Mappings between DC-X character styles and CUE annotations
The dcx-converters/wire/target
property contains
the following settings:
publications
-
Contains an array of entries, one for each supported publication. Each array entry can contain the following properties:
text
-
The display name (label) of a CUE publication.
value
-
The internal name of the publication.
containers
-
An array of entries, one for each container that may be used for imported wire stories. Each array entry can contain the following properties:
text
-
The display name (label) of the container.
value
-
The internal name of the container.
fields
-
An array of entries, one for each container field that is to be used. Each array entry can contain the following properties:
name
-
The name of a DC-X field to be imported.
meta
-
The name of the container field into which the content of
name
is to be imported.
content-types
-
An array of entries, one for each content type that may be used for imported wire stories. Each array entry can contain the following properties:
text
-
The display name (label) of the content type.
value
-
The internal name of the content type.
fields
-
An array of entries, one for each content type field that is to be used. Each array entry can contain the following properties:
name
-
The name of a DC-X field to be imported.
meta
-
The name of the content type field into which the content of
name
is to be imported.
story-elements
-
An array of entries, one for each story element in this content type that is to be used. Each array entry can contain the following properties:
value
-
The internal name of the story element.
fields
-
An array of entries, one for each story element field that is to be used. Each array entry can contain the following properties:
name
-
The name of a DC-X field to be imported.
meta
-
The name of the story element field into which the content of
name
is to be imported.
extract-substrings
-
If the source DC-X field contains rich text (XHTML), then setting this property to
True
, instructs CUE Zipline to extract the text content of each block element in the source field and create a separate story element of this type for each of them. In other words, you can use it to transform a sequence ofp
elements in the source field to a corresponding sequence ofparagraph
story elements in CUE.
binary-content-types
-
An array of entries, one for each binary content type that may be used for imported wire stories. Each array entry can contain the following properties:
text
-
The display name (label) of the content type.
value
-
The internal name of the content type.
fields
-
An array of entries, one for each content type field that is to be used. Each array entry can contain the following properties:
name
-
The name of a DC-X field to be imported.
meta
-
The name of the content type field into which the content of
name
is to be imported.
summary-fields
-
An array of entries, one for each summary field that is to be used. Each array entry can contain the following properties:
name
-
The name of a DC-X field to be imported.
meta
-
The name of the summary field into which the content of
name
is to be imported.
annotations
-
An array of entries containing mappings between DC-X CSS classes and CUE storyline annotations. Note that these mappings are global, not publication-specific. Each array entry must contain the following properties:
name
-
The name of a CSS class used in DC-X
meta
-
The name of a corresponding CUE annotation.