jramirez857 / email-cleaner

Analyze and organize your gmail inbox from your command line to achieve the coveted inbox zero

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sourcery Code style: black

email-cleaner

This script is in development. Right now it can get the top number of senders in a users gmail inbox.

Setup

This script requires you to create a Google Cloud Platform Project and enable the Gmail api. The credentials must be saved in a credentials.json file in the project directory. Create a virtual environment for the project using python 3.9 python -m venv venv Activate the virtual environment and install dependencies by using pip install -r requirements.txt with your virtual environment.

Usage

Example: Group last 100 emails by top senders and decide which ones to move to trash (not a permanent deletion).

python cleanup.py 100

Fetching 100 emails 100 at a time...
  0% (0 of 4) |                                                                                                                                  | Elapsed Time: 0:00:00 ETA:  --:--:--View more info on 14 emails from Dan at Real Python <info@realpython.com>? (y/n)y
subject: last call: Learn Python Effectively
subject: In love, war, and open-source—never give up
subject: Your Roadmap to Clean & Pythonic Code
subject: Real Python Membership Q&A
subject: [🐍PyTricks]: Python's namedtuples can be a great alternative to defining a class manually
subject: No crane kicks at the Python gym
subject: [🐍PyTricks]: The get() method on Python dicts and its "default" arg
subject: how to stay current as a Python developer
subject: [🐍PyTricks]: picking up the basics of Python was the easy part?
subject: Python 4.0
subject: [🐍PyTricks]: How to sort a Python dict by value
subject: [🐍PyTricks]: Different ways to test multiple flags at once in Python
subject: [🐍PyTricks]: Merging two dicts in Python 3.5+ with a single expression
subject: Welcome to the Real Python community!
Delete all 14 emails from Dan at Real Python <info@realpython.com>? (y/n)n
View more info on 12 emails from "IsThereAnyDeal.com" <waitlist@isthereanydeal.com>? (y/n)y
subject: Waitlist: STAR WARS Jedi: Fallen Order $13
subject: Waitlist: Red Dead Redemption 2 $27
subject: Waitlist x3: Mass Effect Legendary Edition $35, Red Dead Redemption 2 $30, STAR WARS Jedi: Fallen Order $13
subject: Waitlist: STAR WARS Jedi: Fallen Order $13
subject: Waitlist: Red Dead Redemption 2 $27
subject: Waitlist x3: Mass Effect Legendary Edition $29, Red Dead Redemption 2 $27, STAR WARS Jedi: Fallen Order $15
subject: Waitlist: Red Dead Redemption 2 $30
subject: Waitlist: Red Dead Redemption 2 $27
subject: Waitlist: Red Dead Redemption 2 $27
subject: Waitlist x2: Marvel's Avengers $16, Red Dead Redemption 2 $28
subject: Waitlist x2: Mass Effect Legendary Edition $30, STAR WARS Jedi: Fallen Order $13
subject: Waitlist x4: Marvel's Avengers $16, Mass Effect Legendary Edition $31, Red Dead Redemption 2 $27
Delete all 12 emails from "IsThereAnyDeal.com" <waitlist@isthereanydeal.com>? (y/n)n
View more info on 2 emails from no-reply@geeksforgeeks.org? (y/n)y
subject: GeeksforGeeks - Please Confirm Registration
subject: Welcome to GeeksforGeeks!
Delete all 2 emails from no-reply@geeksforgeeks.org? (y/n)y

Thanks

About

Analyze and organize your gmail inbox from your command line to achieve the coveted inbox zero

License:MIT License


Languages

Language:Python 100.0%