newsml Processor

A newsml processor exports the content items referenced by the events it receives to NewsML files (which may be used as input to external systems). A newsml processor definition contains the following properties:

  - type: newsml
    filter:
    output:
    - type: file
      output_dir:
      encoding:
      file_name_template:
    download_dir: 

type must be set to newsml. The other properties are:

filter (optional, default: no additional filtering)

A NewsML-specific filter that works in exactly the same way as the global filter described in filter. It performs additional filtering to select only those events that are to be handled by the newsml processor.

output (optional, default: one type=file element with default settings)

An array, each element of which contains settings for a different output method. Currently, however, only one output method is supported, so the array will never contain more than one element.

type (required)

The only allowed value is file, indicating that the NewsML output will be written to file.

output_dir (optional, default: /var/backup/cue/zipline)

The absolute path of the folder to which output NewsML will be written.

encoding (optional, default: utf-8)

The encoding to be used in the output NewsML file (specified in its XML declaration).

file_name_template (optional, default: {{id}}.xml)

A Jinja2 template defining how the output NewsML files will be named. The following properties are available for use in the templates:

id (content item ID)
year
month
day
hour
minute
second
micro

So a template setting such as {{year}}/{{month}}-{{day}}-{{id}}.xml would result in file paths like this: 2020/06-30-9387.xml.

download_dir (optional, default: /tmp/cue/zipline/newsml)

The absolute path of the folder to which downloaded binary files will be written. (If an image content item, for example, is selected and converted to NewsML format, then the image binary file it references is downloaded to this folder.)