0.4.7 • Published 5 months ago

msotr v0.4.7

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

MSOTR

This module is in very early development

Description

Replace MS Office template placeholders with specified content

Requirements

Placeholders in Office document must be encased in "{" and "}"

JSON used for replacing content do not need the curly braces Special nodes:

  • XLSX
    • used for PPTX embedded charts and related tables
  • TABLES
    • Used for PPTX tables
    • Template Requires Header Row and two rows
    • Placeholder name must be somewhere in the table

Either URL or Local are required to import template

Sample

JSON Sample format in "sample.json"

Element Requirements

  • XLSX Element requirements

    • Name - Placeholder name
    • Workbook - Workbook name for referencing embedded Excel file
    • Data - See sample for format
  • TABLES Element requirements

    • Name - Placeholder name
    • Headers - Array of strings
    • Data - 2 dimentional array of string

CLI Usage

node ./dist/msotr.js "\path\to\input.json" "\path\to\template.pptx" "\path\to\output.pptx"

Function Parameters

  • URL (Optional) - URL of template file
  • Local (Optional) - local path of template file
  • Replacements (Required) - JSON containing all placeholder names and values to replace with
  • Out (Optional) - path to export filled template. If omitted, the function will return the filled template as Buffer
0.4.5

5 months ago

0.4.4

5 months ago

0.4.7

5 months ago

0.4.6

5 months ago

0.4.3

5 months ago

0.4.2

5 months ago

0.3.9

5 months ago

0.3.8

5 months ago

0.4.1

5 months ago

0.3.7

6 months ago

0.3.6

6 months ago

0.3.5

6 months ago

0.3.4

6 months ago

0.3.3

6 months ago

0.3.2

6 months ago

0.3.1

6 months ago

0.3.0

6 months ago

0.2.5

7 months ago

0.2.4

7 months ago

0.2.3

7 months ago

0.2.2

7 months ago

0.2.1

7 months ago

0.2.0

7 months ago

0.1.2

7 months ago

0.1.1

7 months ago

0.1.0

7 months ago