npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

writer-print-plugin

v1.1.0

Published

Plugin for creating and editing print information in article

Downloads

2

Readme

Writer Print Plugin

Plugin configuration


{
    "id": "se.infomaker.writerprintplugin", 
    "name": "writerprintplugin",
    "url": "http://localhost:3000/index.js",
    "style": "http://localhost:3000/style.css",
    "mandatory": false,
    "enabled": true,
    "data": {
        "newspilotHostName": "newspilot.host",        
        "openContentHost": {
            "protocol": "https://",
            "hostName": "im-npdev.dev.proxy.infomaker.io",
            "port": "5555",
            "healthPath": "/health",
            "queryPath": "/search",
            "objectPath": "/objects",
            "sortingsPath": "/sortings"        
        }
    }
}

Open Content backend extra configuration

These properties has to be setup in the Open Content the Writer uses.

xpath for checking print in OC:
    /newsml:newsItem/newsml:itemMeta/newsml:itemMetaExtProperty[boolean(@creator)]/@value='x-im/print'

xpath for getting the alternate link in OC (glöm inte att sätta upp namespace för newsml och im): 
    /newsml:newsItem/newsml:itemMeta/im:links/im:link[@rel='alternate']/@uuid

Extra transformations in Transformation service

The plugin setts newspilot print properties in the newsItem. The properties can/should be used to set corresponding values in the newspilot exchange xml. These are:

        <itemMetaExtProperty type="npext:organizationId" value="1"/>
        <itemMetaExtProperty type="npext:productId" value="1"/>
        <itemMetaExtProperty type="npext:departmentId" value="1"/>
        <itemMetaExtProperty type="npext:sectionId" value="177"/>
        <itemMetaExtProperty type="npext:articleTypeId" value="134"/>
        <itemMetaExtProperty type="npext:layoutProperties" value="..."/>
        <itemMetaExtProperty type="npext:action" value="CREATE"/>
        <itemMetaExtProperty type="npext:jobId" value="15445"/>

Development

This Digital Writer plugin follows the standards set by the dw-jumpstart-plugin. Make sure you use git-flow.

There are some environment variables that has to be set (these are preferably set in a local .env file not to be included in git):

BITBUCKET_LOGIN=infomakerit
BITBUCKET_PASS=_bitnbucket_password_
BITBUCKET_USER=infomaker
BITBUCKET_REPO=writer-print-plugin
S3_BUCKET=dw-plugins-internal
S3_ACCESS_KEY=_s3_access_key_
S3_SECRET_ACCESS_KEY=_s3_secret_access_key_
S3_REGION=eu-west-1
PORT=5002
NPM_TOKEN=_npm_token_to_download_private_dependencies (newspilot-js-client).

Releases

When you are about to make a release (or a hotfix) make sure...

That you have created a version in your Issue Tracker and that your work is represented in resolved issues for the version that you want to release. That you follow git-flow, i.e. if you are about to do a "hotfix" you should be on master branch, if making a release you should be on develop. With that out of the way, follow these steps:

Depending on the type of release you are about to perform, execute npm run-script release:hotfix, npm run-script release:minor or npm run-script release:major. The script will (if everything looks fine) create a release branch in git, run test, build and validate the plugin artifacts, build the changelog and update the manifest. The scripts will also commit the updated files. Execute the "finish release" command in git-flow and push the tag (i.e. version) to develop and master. The bitbucket pipelines will upload your plugin to a S3 bucket where a lambda will validate and then publish your plugin. You should be able to see your plugin in the list here https://plugins.writer.infomaker.io/.

Use in Writer

To get link to the different versions in the Writer use:

  • Development version: https://plugins.writer.infomaker.io/v1/infomaker/im-npprint/dev/index.js
  • Latest release version: https://plugins.writer.infomaker.io/v1/infomaker/im-npprint/latest/index.js
  • Specific release version: https://plugins.writer.infomaker.io/v1/infomaker/im-npprint/1.1.0/index.js