Newspilot Job Plugin

Supports list/dnd of images in Newspilot Job to which article belongs.

Note that in order for plugin to actually get images to render the article needs to be linked to
Newspilot article, i.e. article has been created in Newspilot.

Note that this plugin has dependency to Newspilot (beside the actual Writer), see manifest.json.

Architecture

Architecture

NP Job Plugin fetches information of images in newspilot for linked newspilot article using socket api calls
to Newspilot Server.

When user drags an image from plugin onto article the "main" or ordinary route for uploading images
via URL drop in Newspilot Writer is executed. The NP Job Plugin have constructed an URL that points
to NP Image Server that can handle images in Newspilot regardless of store location (i.e. if image is stored in database or on volume).

Plugin configuration

{
  "id": "io.infomaker.npjob",
  "name": "im-npjob",
  "url": "https://plugins.writer.infomaker.io/v1/infomaker/im-npjob/{PLUGIN_VERSION}/index.js",
  "style": "https://plugins.writer.infomaker.io/v1/infomaker/im-npjob/{PLUGIN_VERSION}/style.css",
  "enabled": false,
  "mandatory": false,
  "data": {
    "imageProxyServer": "https://image.proxy.host",
    "newspilotHostName": "newspilot.host",
    "externalSystemId" : 12,
    "storeLocationConfig": {
      "111": {
        "type": "editorial-opencontent"
      }
    }
  }
}

Note that if you want to access (load) the latest released version of the plugin, you should replace {PLUGIN_VERSION}
with latest in the "url" and "style" properties above.

imageProxyServer corresponds to NP Image Server in image above.

externalSystemId should be the ID of the external system which the writer is connected to.

storeLocationConfig Contains the IDs of store locations which should be treated differently.

Supported Store location config types

editorial-opencontent

    "storeLocationConfig": {
      "111": {
        "type": "editorial-opencontent"
      }

If the store location (in this case with id 111) is of type S3 and connected to Editorial Open content, the link will be constructed as x-im-entity://x-im/image.
This link will then be picked up by the ximimage-plugin.

Output

An image that has been dragged and dropped onto the article will generate the same output as se.infomaker.ximimage
plugin. In addition, if metadata fields for "caption", "created date", "creator" and/or "name" is supplied in the plugin,
this metadata will be consumed by writer and added to binary (and newsitem).

Note that plugin require https when communicating with Newspilot API.