mbox-attachment-extract
Version:
Node.js cli tool to extract attachments from .mbox files
43 lines (25 loc) • 1.54 kB
Markdown
# mbox-attachment-extract
[](https://app.buddy.works/dev-next/mbox-attachment-extract/pipelines/pipeline/204178)
[](https://www.codefactor.io/repository/github/andre000/mbox-attachment-extract)
[](https://github.com/andre000/mbox-attachment-extract/network/dependencies)
This is a cli tool to extract attachments from .mbox files.

## Installation
Install with npm: `npm i mbox-attachment-extract -g`
## Usage
The command:
`mbox-attachment-extract <<path-to-mbox-file>> <<path-to-extracted-files>>`
Parameters:
`--pattern, -p` Regex to filter attachments. Default: ''
`--filenameAsSubject, -s` Create the attachment with the subject as the filename. Example: fromdomain_subject.zip
`--help` Show the help message
## Demo

## Tests
Run the command: `npm t`
## Packages
- [chalk](https://github.com/chalk/chalk)
- [meow](https://github.com/sindresorhus/meow)
- [ora](https://github.com/sindresorhus/ora)
- [node-mbox](https://github.com/robertklep/node-mbox)
- [mailparser](https://github.com/nodemailer/mailparser)