Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mike42/mail2csv
Export email messages in a Maildir as CSV file
https://github.com/mike42/mail2csv
csv email
Last synced: 2 months ago
JSON representation
Export email messages in a Maildir as CSV file
- Host: GitHub
- URL: https://github.com/mike42/mail2csv
- Owner: mike42
- Created: 2018-06-24T20:18:38.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-06-24T20:19:01.000Z (over 6 years ago)
- Last Synced: 2024-10-11T02:11:41.828Z (3 months ago)
- Topics: csv, email
- Language: Python
- Size: 1.95 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# mail2csv
This command-line utility converts the contents of a `Maildir` to a CSV file. Each header becomes a CSV column, and each email becomes a row.
```
$ mail2csv example/
Date,Subject,From
"Wed, 16 May 2018 20:05:16 +0000",An email,Bob
"Wed, 16 May 2018 20:07:52 +0000",Also an email,Alice
```By default, only `Date`, `Subject` and `From` headers are shown. Use `--headers` to specify which other headers to include, and `--all-headers` to include them all.
## Requirements
- Python 2 or 3.
## Installation
```
cp mail2csv.py /usr/local/bin/mail2csv
```## Full usage
```
usage: mail2csv.py [-h] [--outfile OUTFILE] [--headers HEADERS [HEADERS ...]]
[--all-headers]
maildirConvert maildir to CSV.
positional arguments:
maildir Directory to read fromoptional arguments:
-h, --help show this help message and exit
--outfile OUTFILE File to output to. Standard output is used if this is
not specified
--headers HEADERS [HEADERS ...]
Headers to include
--all-headers Include all headers. Alias for --headers '*'
```