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

office-addin-manifest-converter

v0.4.1

Published

A tool to convert Microsoft Office add-in manifests from XML format to JSON format.

Downloads

133,935

Readme

Office-Addin-Manifest-Converter

This package provides the ability to convert an XML manifest to JSON manifest for Office add-ins.

Command-Line Interface

convert

Convert the Office add-in manifest from XML format to JSON format.

Syntax:

office-addin-manifest-converter convert <xml-manifest-file> [options]

Parameter:

xml-manifest-file: path to the XML manifest file.

Options:

-o <string> or --output <string>

Specify the path to an output directory that will contain the generated JSON manifest and related files. If there is no output directory specified, the default directory will have the same name as the input file's base name and be located at the same place of the input file. For example, if the input XML file is C:\xmlManifests\myAddin.xml, the default output directory will be C:\xmlManifests\myAddin.

-i or --image-download

Specify that the conversion should download the root images color and outline into the output directory.

-v or --verbose

Specify that extra log messages should be written to console.

--schema-override <url>

The url that property $schema will be set to. Default is the latest public version schema that the converter supports. $schema and manifestVersion (set with --schema-version-override parameter) properties should be in sync.

--schema-version-override <version>

The version string that property manifestVersion will be set to. Default is the latest public version that the converter supports (ie "1.17" etc). $schema (set with --schema-override parameter) and manifestVersion properties should be in sync.

Example:

After the package has been installed globally, the following command converts the an XML manifest file, C:\xmlManifests\myAddin.xml, to json manifest and puts the converted files into C:\jsonManifests\myAddin directory.

office-addin-manifest-converter convert C:\xmlManifests\myAddin.xml -o C:\jsonManifests\myAddin -iv

In the command, both verbose and image-download flags are turned on.

API Usage

This package provides an API called convert. The API takes two required parameters and two optional ones:

convert(inputXmlManifestFile: string, outputJsonManifestFolder: string, imageDownload: boolean = false, verbose: boolean = false);

inputXmlManifestFile: path of the input XML manifest file.

outputJsonManifestFolder: path of the output folder that will contain all generated files, including one JSON manifest file and a few icon files.

imageDownload: whether the conversion should download the images into the output directory.

verbose: whether extra log messages should be written to console.

The following example converts an XML manifest file, C:\xmlManifests\myAddin.xml, to json manifest and puts the converted files into C:\jsonManifests\myAddin folder.

var converter = require("office-addin-manifest-converter");

converter.convert("C:/xmlManifests/myAddin.xml", "C:/jsonManifests/myAddin", true, false);

Versions

0.4.1 - Fix bug for converting four part version format "0.0.0.0" to the three part format used in json manifest ("0.0.0") as specified by https://semver.org/.

0.4.1 - Add support for devpreview ReportPhishingCommandSurface extension point.