Merge multiple presenation documents together into a single document.
- Node.js - JavaScript runtime environment.
- libExpat - Expat is a stream-oriented parser in which an application registers handlers for things the parser might find in the XML document
brew install node expat
Once you've aquired the system dependencies, you can now install the project depnendencies.
Ensure you have NPM GitHub repository set in your project .npmrc
echo "@dfe-digital:registry=https://npm.pkg.github.com" >> .npmrc
Install to your project
npm install --save @dfe-digital/presentation-merger
Presenation merger will merge the given files and STDOUT
the merged presentation.
Providing the option --file merged.odp
will write the merged presentations to merged.odp
.
presentation-merger my-pres1.odp my-pres2.odp
Additional debugging information is available by definding the environment variable DEBUG=presentation-merger
.
DEBUG=presentation-merger presentation-merger my-pres1.odp my-pres2.odp
const mergeFiles = require('./index.js')
async function main() {
let files = ['./my-pres1.odp', './my-pres2.odp'];
let stream = fs.createWriteStream('./merged.odp', { flags: 'w' });
await mergeFiles(files, stream);
}
note: requires babel or pre-compiling
Unit testing is handled by the Jest framework.
npm test
We love contributions! View our contribution guidelines.
This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
Unless stated otherwise, the codebase is released under the MIT License. This covers both the codebase and any sample code in the documentation. The documentation is © Crown copyright and available under the terms of the Open Government 3.0 licence.