https://github.com/douglascdev/gmail_attachment_downloader
A command line application that downloads all the gmail attachments with the specified format and search terms.
https://github.com/douglascdev/gmail_attachment_downloader
Last synced: 8 months ago
JSON representation
A command line application that downloads all the gmail attachments with the specified format and search terms.
- Host: GitHub
- URL: https://github.com/douglascdev/gmail_attachment_downloader
- Owner: douglascdev
- License: mit
- Created: 2021-04-07T15:33:36.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2024-01-07T00:07:45.000Z (over 2 years ago)
- Last Synced: 2025-02-01T01:51:22.354Z (over 1 year ago)
- Language: Python
- Size: 17.6 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Gmail Attachment Downloader
[](https://github.com/psf/black)
A command line application that downloads all the gmail attachments with the specified format and search terms. It's still in alpha, so feel free to contribute :)
## Installation
Simply run:
```
pip install gmail-attachment-downloader
```
## Usage
Check the available options with:
```
> gmail_attachment_dl --help
Usage: gmail_attachment_dl [OPTIONS]
Options:
-e, --email TEXT The email address used to login and retrieve
attachments
-i, --inbox TEXT Name of the inbox containing your email [default:
Inbox]
-s, --search TEXT Equivalent to gmail's search box(attachments are
always filtered) [default: ]
-f, --folder TEXT Folder where attachments will be saved
-ext, --file_ext TEXT Extension in which the downloaded attachments will be
saved
-m, --mime_type TEXT MIME Type to filter attachments(guessed from
extension by default)
--help Show this message and exit.
```
You are required to provide the following options:
```
> gmail_attachment_dl -e example@gmail.com -f "C:\My Attachments" -ext pdf
```
This will search your default Inbox for every pdf file and save them at "C:\My Attachments", so you probably want to be more specific than that.
Here's how you would download every pdf from unread e-mails on the Test inbox:
```
gmail_attachment_dl -e example@gmail.com -f "C:\My Attachments" -ext pdf -s "is:unread" -i Test
```
The `-s` option allows you to use any filters you would use in gmail. You can check the available filters at `https://support.google.com/mail/answer/7190?hl=en`.
The `-i` option allows you to specify an Inbox to search.