Gmail Attachment Downloader
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.
Release files for gmail-attachment-downloader 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| gmail_attachment_downloader-0.0.2.tar.gz | 4.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gmail_attachment_downloader-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.7 kB
Release files / gmail_attachment_downloader-0.0.2.tar.gz
| Download URL | gmail_attachment_downloader-0.0.2.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aa2e0fb09560a59820370b94921c81ed2aee46ea19301ea23160af90ea42c5d5
|
|
BLAKE2b-256 checksum How to use checksums |
4254f5008c777a6ea5e479326ee88d2fa60181e1c649379efd0eeb576fe73288
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.6.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5
|
Release files / gmail_attachment_downloader-0.0.2-py3-none-any.whl
| Download URL | gmail_attachment_downloader-0.0.2-py3-none-any.whl |
|---|---|
| Size | 5.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
70a1b88bb63bc2912890e789e203047a1d4e7fd3047155be5b8dd7847145d706
|
|
BLAKE2b-256 checksum How to use checksums |
fe4921554668978ab85c0886c255a18c607a91ecc9484142f2e19687c319ee24
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.6.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5
|