Get the latest news and tutorials on open source to improve yourself as a hacker.

Post Top Ad

Operating Systems

Hacker

Post Top Ad

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

No comments:

Post a Comment

Post Top Ad