Featured

    Featured Posts

Purge your gmail inbox with this python script

My gmail inbox is full. Cleansing almost 400k of emails from my inbox manually is impossible, so I decided to put into usage a very useful Python script which I found on Github after hours of research. 

Being able to run the script in the background, I managed to cleanse almost 22k emails in a 4 hours period of time. Although not the best tool available, the fact it is open source and free, makes it the best option for my own case.

Download the tool from Github

Make use of the following command to download the source code from the official repository.
git clone https://github.com/marin117/Gmail-deleter.git

How to setup the script on your own machine

Having tested the tool with Python 2.7, I have come to the conclusion that such version of Python is the right one for setting up the environment. As for the dependencies, a virtual environment is required. The following command can help you to setup a fresh virtual environment inside the project's root.
virtualenv -p /usr/bin/python env
source env/bin/activate 
Then install the requirements with the help of the following command.
pip install -r requirements.txt
Once you have managed to successfully install the requirements on your own machine, then comment the following lines.
#import matplotlib.pyplot as plt # on google_client.py
#import matplotlib.pyplot as plt # on gmail_deleter.py
The last thing is to enable the Gmail API and save the credentials.json inside the project's root directory.
Click on Create and then download the configuration.

Once you have downloaded it, save it inside the project's root directory. Such step is required for the authentication. Now you are ready for the purge.

Purge your gmail inbox

The initiation of the purge is as simple as typing the following command while being inside the project's root directory.
python src/gmail_deleter.py
Once the above command is being executed successfully then the following will come up.

Choose the first option as shown below.
1

And let the purging take place. Enjoy the script in the background while working on your daily tasks.
Copyright hackermilk.info
author

janoroot

I fight for justice, righteousness and divine order on mother Earth. My main objective is to become a true man. As a soul who felt connected with Russia since a little kid, orthodox kozaks is my main definition of manhood.

Always curious on how stuff works under the hood, computer hacking has always been my way of materializing the true essence of my soul in the third dimension. My life as a hacker got really interesting when I discovered Python and Ubuntu Linux. Thirsty for knowledge, open source technologies are my main toys.

With the main purpose of adding joy on my journey as a computer nerd, I have decided to connect with hackers and aspiring ones through the content I do publish on this website. Being published on well established computer technology websites such as sitepoint and digitalocean, I produce high-quality content for anyone who is interested in improving their hacking skills further.

As a Python coder who spends most of his time creating projects from scratch and hacking various libraries, I am the savior to the beginner and the intermediate programmer.

Get Free Email Updates to your Inbox!

Post a Comment

www.CodeNirvana.in

Blog Archive

Recent Posts

Translate

Total Pageviews