Analyze and visualize your Gmail-ing trends

Want to know who sends you the emails most often, or which is the year/month/day/hour you receive the emails most? With the help of a handy program called mail-trends you can easily visualize your Gmail-ing activities. Though it is a command line program but the output is a graphically rich interactive html file. And take my words, the command to launch the program is very simple.

Requirements:

1. The only requirement for mail-trends is Python but this tutorial is for any version of Ubuntu. With little bit of more work, it should work pretty well with any flavor of Linux, Windows, or Mac.

2. You have got a Gmail or Google Apps mail account and have enabled IMAP. Enable IMAP from Settings>Forwarding and POP/IMAP>Enable IMAP

Now, fire up the terminal window and get ready for some simple commands:

Python always comes shipped with Ubuntu, so you don’t need to worry about it.

1. Install Cheetah, an open source template engine, and code generation tool. Shoot the following command to install Cheetah:

$ sudo apt-get install python-cheetah

2. Either get mail-trends tar file from the terminal window…

$  wget http://mail-trends.googlecode.com/files/mail-trends-20080326.tar.gz

OR visit http://mail-trends.googlecode.com to download the stable version. Also, those of you who prefer to get your hands on the latest version can download the latest code from the Subversion by issuing: $ svn checkout http://mail-trends.googlecode.com/svn/trunk/ mail-trends

3. Untar the mail-trends tar’d file by issuing:

$ tar xfv mail-trends-20080326.tar.gz

You will get a folder called mail-trends

4. Get inside mail-trends directory:

$ cd mail-trends
5. Issue the following command to analyze your Gmail

$ python main.py --server=imap.gmail.com --use_ssl --username=yourgmailusername@gmail.com --me=yourusername@gmail.com --skip_labels

It will then ask for your Gmail password.

If everything goes right, it will create a directory out inside the mail-trends directory and creates an index.html file and three other files inside the out directory.

Fire up the index.html file to open an interactive visualization of your Gmails.

No related posts.

Spread the word, pleasssseee:
Filed under: Installation, Linux, , , , ,

This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.

11 Responses

  1. VGH Says:

    Tried this and got the following error.

    [2008-09-25 00:33:37,479] Initializing
    Traceback (most recent call last):
    File “main.py”, line 249, in
    opts = GetOptsMap()
    File “main.py”, line 35, in GetOptsMap
    assert “username” in opts_map
    AssertionError

    Posted on September 24th, 2008 at 12:04 pm

  2. admin Says:

    @VGH make sure you have supplied your full gmail address: yourusername@gmail.com

    Posted on September 24th, 2008 at 2:50 pm

  3. VGH Says:

    thanks. seems to work.

    Posted on September 25th, 2008 at 11:25 am

  4. ABG Says:

    where should i supply the full gmail address? i’m getting the exact same error.

    Posted on November 11th, 2008 at 5:39 pm

  5. Haraye Says:

    I don

    Posted on February 9th, 2009 at 3:34 am

  6. PeeAway Says:

    Superb post, thanks

    Posted on February 27th, 2009 at 12:55 am

  7. Katlyn Loyd Says:

    Hi nice post, i read your blog from time to time but i was wondering something. I also run a blog on a similar topic, but i get 1,000’s of spam comments and emails every day does that happen to you.. Any ideas to stop it? I currently have commenting disabled but i want to turn it back on.. Thanks!

    Posted on February 27th, 2009 at 9:35 pm

  8. Manual Trapp Says:

    Super-Duper site! I am loving it!! Will come back again – taking you feeds also, Thanks.

    Posted on April 27th, 2009 at 8:44 am

  9. Tyrone Says:

    It just don’t make sense to me, plain damn weird…

    Posted on July 7th, 2009 at 9:58 am

  10. raf Says:

    even getting off the ground in getting cheetah up is troubling. any help on this error?

    …macosx-10.5-i386-2.5/src/_namemapper.o
    unable to execute gcc: No such file or directory
    error: command ‘gcc’ failed with exit status 1

    Posted on October 16th, 2009 at 5:50 pm

  11. bmac Says:

    you have to install xcode

    Posted on November 17th, 2009 at 7:27 pm

Leave a Reply




Comment moderation is enabled. Your comment may take some time to appear.