How to use the cfb.version function in cfb

To help you get started, we’ve selected a few cfb examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github SheetJS / js-cfb / types / bin_cfb.ts View on Github external
/* cfb.js (C) 2013-present  SheetJS -- http://sheetjs.com */
/* eslint-env node */
/* vim: set ts=2 ft=javascript: */
const n = "cfb";
import * as X from 'cfb';
import fs = require('fs');
import program = require('commander');
import PRINTJ = require("printj");
const sprintf = PRINTJ.sprintf;
program
	.version(X.version)
	.usage('[options]  [subfiles...]')
	.option('-q, --quiet', 'process but do not report')
	.option('-l, --list-files', 'list files')
	.option('-z, --dump', 'dump internal representation but do not extract')
	.option('-r, --repair', 'attempt to repair and garbage-collect archive')
	.option('-c, --create', 'create file')
	.option('-a, --append', 'add files to CFB (overwrite existing data)')
	.option('-d, --delete', 'delete files from CFB')
	.option('--dev', 'development mode')
	.option('--read', 'read but do not print out contents');

program.parse(process.argv);

const exit = process.exit;
const die = (errno: number, msg: string) => { console.error(n + ": " + msg); exit(errno); };
const logit = (cmd: string, f: string) => { console.error(sprintf("%-6s %s", cmd, f)); };

cfb

Compound File Binary File Format extractor

Apache-2.0
Latest version published 3 years ago

Package Health Score

67 / 100
Full package analysis