js-cfb/packages/cfb-cli/README.md

49 lines
1.4 KiB
Markdown
Raw Normal View History

2020-07-09 06:12:05 +00:00
# Container File Blobs
This CLI tool inspects and can manipulate supported files, leveraging the base
[`cfb` library](https://www.npmjs.com/package/cfb).
## Installation
It is preferable to install the library globally with npm:
```bash
$ npm install -g cfb-cli
```
The global installation adds a command `cfb-cli` which can work with files.
## Usage
- `cfb file [names...]` extracts the contents of the file. If additional names
are supplied, only the listed files will be extracted.
- `cfb -l file` lists the contained files (following `unzip -l` "short format")
- `cfb -r file` attempts to repair by reading and re-writing the file.
This fixes some issues with files generated by non-standard tools.
- `cfb -c file [files...]` creates a new file containing the listed files.
The default root entry name is `Root Entry`.
- `cfb -a file [files...]` adds the listed files to the original file.
- `cfb -d file [files...]` deletes the listed files from the original file.
## License
Please consult the attached LICENSE file for details. All rights not explicitly
granted by the Apache 2.0 license are reserved by the Original Author.
## Credits
Special thanks to [Garrett Luu](https://garrettluu.com/) for spinning off the
command from the CFB module.
[![Analytics](https://ga-beacon.appspot.com/UA-36810333-1/SheetJS/js-cfb?pixel)](https://github.com/SheetJS/js-cfb)