Skip to content

Merge multiple presentation documents together into a single document

License

Notifications You must be signed in to change notification settings

DFE-Digital/presentation-merger

Repository files navigation

Presnetation Merger

GitHub package.json version CI Test Coverage Maintainability Inline docs stability-unstable contributions welcome

Merge multiple presenation documents together into a single document.

🎲 Installation

System dependencies

  • 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

Installation via Homebrew (macOS)

brew install node expat

Project dependencies

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

🎯 Useage

CLI useage

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

JavaScript module (ES6 / ES2015)

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

🤖 Testing

Unit testing is handled by the Jest framework.

npm test

👤 Contributing

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.

🎓 License

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.

About

Merge multiple presentation documents together into a single document

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages