A tool to save attachments from plain text emails
Project description
Clingy lets you save attachments from plain text emails.
From the command line, you can use it like this:
```
clingy email1.txt email2.txt email3.txt
```
By default, the attachments will be saved into the current directory.
You can specify a different directory using `-d` or `--directory` like so,
and the directory will be created if it does not exist:
```
clingy email.txt -d out
```
You can save specific attachments using glob patterns (`-g` or `--glob`)
and regular expressions (`-r` or `--regex`):
```
clingy email.txt -g "*.txt"
clingy email.txt -r "^.+\.txt ")
```
The combo glob/regex matcher is also available for good measure:
```python
import clingy
clingy.match("foo.txt", glob="*.txt")
clingy.match("foo.txt", regex="\.txt$")
````
From the command line, you can use it like this:
```
clingy email1.txt email2.txt email3.txt
```
By default, the attachments will be saved into the current directory.
You can specify a different directory using `-d` or `--directory` like so,
and the directory will be created if it does not exist:
```
clingy email.txt -d out
```
You can save specific attachments using glob patterns (`-g` or `--glob`)
and regular expressions (`-r` or `--regex`):
```
clingy email.txt -g "*.txt"
clingy email.txt -r "^.+\.txt
```
The combo glob/regex matcher is also available for good measure:
```python
import clingy
clingy.match("foo.txt", glob="*.txt")
clingy.match("foo.txt", regex="\.txt$")
````