Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
docxtemplater-cli
Advanced tools
This repository contains code for the docxtemplater-cli
To install the cli, run :
npm install -g docxtemplater-cli
To run docxtemplater, run :
docxtemplater input.docx data.json output.docx
It is possible to set the delimiters, or some other option by using some json in the options argument like this :
docxtemplater --options '{"delimiters": {"start": "[[", "end": "]]"}}' input.docx data.json output.docx
Since version 3.7.0, released in February 2023, you can include modules using the --modules flag
To use this flag, you first need to create a file on your file system like this :
In this file you need to export an Array of all modules that you want to include
my-modules.js
const ImageModule = require("docxtemplater-image-module");
const imageOpts = {
centered: false,
getImage: function (tagValue, tagName) {
return fs.readFileSync(tagValue);
},
getSize: function (img, tagValue, tagName) {
// it also is possible to return a size in centimeters, like this : return [ "2cm", "3cm" ];
return [150, 150];
},
};
module.exports = [new ImageModule(imageOpts)];
Then, in your calling code, use it like this :
docxtemplater --modules my-modules.js input.docx data.json output.docx
FAQs
This repository contains code for the docxtemplater-cli
The npm package docxtemplater-cli receives a total of 4 weekly downloads. As such, docxtemplater-cli popularity was classified as not popular.
We found that docxtemplater-cli demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.