Giter Club home page Giter Club logo

gmail-clutter-finder's Introduction

MBox-Reader

My GMail inbox has been filling up after being used for the past few years. I didn’t want to pay for extra storage, so I’ve been clearing out old newsletters and promotional emails to reduce clutter.

Finding the emails to delete was a pretty manual process. I had a few hours to spare, so I wrote a program to find the email addresses that sent this clutter.

Requirements

pip install cx_Freeze

This is a script that was written in Python 3.6.4. It shold work with Python 3.0+. It uses tkinter to create the GUI, and cx_freeze to compile to an executable.

FAQ

Does this collect any private information?

No, I couldn’t care less about your mail.

Brian, this looks ugly as hell

Yeah.

When I download it, my browser says it's not commonly downloaded and may be dangerous

Hahaha I know

Nerdy stuff

  • This started off as a command line program, but I figured this could help people who didn’t know how to use the command line. So I spent a couple hours learning a few libraries to port this into a real, usable program. You know, like, with buttons.
  • Since an mbox file can be huge, it’s important not to load the whole file into memory. To avoid excessive memory consumption, only one line from the mbox file is read at a time.
  • A defaultdict is used to store every sender’s email count. A maxheap is then used to build a sorted list of most common email senders, running in nlog(n) time. To relieve burden during the heapify process, only senders with an email count above a cutoff (currently 50) will be sent into the heap.
  • This was my first time using a GUI library with Python and creating an exe from it. The documentation for tkinter and cx_freeze were fantastic, so learning them was much smoother than I thought it would be.
  • The program’s zip file is about 37MB. This is awfully large for such a small program. That’s because cx_freeze pulls the entire tkinter framework into the build. I don’t feel like fixing that right now.

How do I get an MBox file?

To get a dump of your entire GMail inbox, go to https://takeout.google.com/settings/takeout

Author

Brian Lam

gmail-clutter-finder's People

Contributors

brian-lam avatar

Stargazers

 avatar Tristan Wiley avatar

Watchers

James Cloos avatar  avatar

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.