Highlight the diff between two LibreOffice spreadsheets with the simple
node
andCLI
interfaces ofods-diff
CLI
Installation
$ npm install --global ods-diff
Usage
Output version
$ odsdiff -V0.1.0
Output usage help
$ odsdiff -h Usage: odsdiff [options] Options: -h, --help output usage information -V, --version output the version number -v, --verbose output all intermediate steps informations -o, --f1 <path> path of the original file to diff from -m, --f2, <path> path of the modified file to diff to -O, --out [<path>] destination path
Standard usage:
$ odsdiff --f1 ./docs/v1/report.ods --f2 ./docs/v2/report.ods --out ./docs/report.diff.ods
Node API
Installation
$ npm install --save ods-diff
Usage
const odsDiff = const path = const reportv1Path = pathconst reportv2Path = pathconst reportDiffPath = path const odsDiffOptions = cvsDelimiter: ',' // default: ';' verbose: true // default: false out: reportDiffPath // default patern: './<f1_basepath>/<f1_basename>__diff__<f2_basename>.ods'
Note
Please note what name you must use depending what you are going to do with ods-diff
The repository name is node-ods-diff
to show it is a node.js module
$ git clone https://github.com/sirap-group/node-ods-diff
The package name is ods-diff
because we are in node.js context
$ npm i -s ods-diff
const odsDiff =
The CLI command is odsdiff
, because it is more standard as a *nix CLI tool and it is quicker to tape on keyboard.
$ npm i -g ods-diff
$ odsdiff -v1.1.0
Contributing
Pull Requests are welcome !
The code of the Node.js API is in index.js
, and the code for the CLI API is located in bin/cli.js
.
The code respects the standard js code style, please follow it too.
Please note the following list of goals to achieve before starting to contribute.
TODO:
- refactor
index.js
replacing most of the functions by prototypes and methods - write unit tests
- setup gulp build with
- js lint (standard)
- run tests
- run test coverage
- watch changes then lint, test and coverage
License
MIT © Rémi Becheras, Groupe SIRAP