@sabirmgd/cimb-statement-parser
v0.2.0
Published
Deterministic CIMB bank statement PDF parser with CLI and library API.
Downloads
180
Maintainers
Readme
CIMB Statement Parser
Deterministic parser for CIMB statement PDFs.
It ships as:
- a CLI:
cimb-statement-parser - a library export:
parseCimbStatementPdfDeterministic - a CSV serializer:
transactionsToCsv
Install
Local install:
npm installFrom a published npm package:
npm install @sabirmgd/cimb-statement-parserCLI Usage
npx @sabirmgd/cimb-statement-parser /path/to/CIMBClicks.pdf output.jsonCSV output:
npx @sabirmgd/cimb-statement-parser /path/to/CIMBClicks.pdf output.csvOr force the format explicitly:
npx @sabirmgd/cimb-statement-parser /path/to/CIMBClicks.pdf report.txt --format csvOr after install:
cimb-statement-parser /path/to/CIMBClicks.pdf output.jsonIf you omit output.json, the parsed JSON is printed to stdout.
Library Usage
const {
parseCimbStatementPdfDeterministic,
transactionsToCsv,
} = require("@sabirmgd/cimb-statement-parser");
async function run(pdfPath) {
const transactions = await parseCimbStatementPdfDeterministic(pdfPath);
const csv = transactionsToCsv(transactions);
console.log(csv);
}Verify
Run the regression tests:
npm testCheck the npm tarball contents:
npm run pack:checkPublish
- Bump the version in
package.json. - Log in to npm:
npm login- Publish:
npm publishIf you use a scoped package and want it public:
npm publish --access publicIncluded Files
The published package includes only:
cimb-deterministic.jsindex-deterministic.jspdf-helper.jsREADME.md
