Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@advisr/pptx-compose

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@advisr/pptx-compose

PPTX parser to JSON format

  • 0.4.1
  • unpublished
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

pptx-compose npm version

Parses Open Office XML generated PPTX to JSON

Install

$ npm install pptx-compose

See changelog here for API updates and compatibility issues.

Usage

import PPTXCompose from "pptx-compose";

// Initialize repo
const composer = new PPTXCompose(options);

// Parses a PPTX file to JSON
const pptx = await composer.toJSON("/path/to/my.pptx");

// Parses JSON output to PPTX
const json = await composer.toPPTX("/path/to/my.json");

CLI

Composer is able to generate JSON from PPTX source directly from CLI, run:

# Usage: convert [options] <input> <output>
# Options:
#   -V, --version  output the version number
#   -i, --input    PPTX File
#   -o, --output   Output JSON file (optional)
#   -h, --help     display help for command

$ node bin/convert ./path/to/my.pptx path/to/your/directory/generated.json

Options

attributetypedefault
jszipBinary"nodebuffer" / "base64" / "text" / "binarystring" / \ "array" / "uint8array" / "arraybuffer" / "blob"nodebuffer
jszipGenerateType"nodebuffer" / "base64" / "text" / "binarystring" / \ "array" / "uint8array" / "arraybuffer" / "blob"nodebuffer

Methods

PPTX Composer has following built-in methods:

.toJSON(<pptx_file_path>, <options{Options & { output: string }}>)

Parse PowerPoint file to JSON.

const composer = new PPTXCompose();

// Parses a PPTX file to JSON
const pptx = await composer.toJSON("/path/to/my.pptx");

// Convert a PPTX file to JSON file
composer.toJSON("/path/to/my.pptx", {
  output: "/path/to/output/file.pptx",
});

.toPPTX(<json>, <options{Options & { output: string }}>)

Convert JSON file to PPTX.

const composer = new PPTXCompose('{ "my": "json" ... }');

// Parses JSON output to PPTX
const json = await composer.toPPTX("/path/to/my.json");

// Convert JSON to PPTX file
composer.toJSON("/path/to/my.json", {
  output: "/path/to/output/file.pptx",
});

License

MIT

Keywords

FAQs

Package last updated on 22 Mar 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc