Code Monkey home page Code Monkey logo

gmail_attachment_downloader's Introduction

Gmail Attachment Downloader

Code style: 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 [email protected] -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 [email protected] -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.

gmail_attachment_downloader's People

Contributors

douglascdev avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

kamilkrzeminski

gmail_attachment_downloader's Issues

General code improvements

  • Replace setup.py with pyproject.toml(and remove requirements folder)
  • Replace all templates with f-strings
  • Replace general module imports with specific class/function imports

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.