A command line application that downloads all the gmail attachments with the specified format and search terms
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for gmail_attachment_downloader-0.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa2e0fb09560a59820370b94921c81ed2aee46ea19301ea23160af90ea42c5d5 |
|
MD5 | cef65fc9df9f3bf86c540236377be35f |
|
BLAKE2b-256 | 4254f5008c777a6ea5e479326ee88d2fa60181e1c649379efd0eeb576fe73288 |
Hashes for gmail_attachment_downloader-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70a1b88bb63bc2912890e789e203047a1d4e7fd3047155be5b8dd7847145d706 |
|
MD5 | 5c459a31e1c0200c37f35a6a199c931a |
|
BLAKE2b-256 | fe4921554668978ab85c0886c255a18c607a91ecc9484142f2e19687c319ee24 |