Skip to content

Latest commit

 

History

History
47 lines (39 loc) · 1.59 KB

problem.org

File metadata and controls

47 lines (39 loc) · 1.59 KB

## Task Create a Python script that reads a .mbox file and calculates some statistics from the mbox and prints them to stdout.

## Input: any mbox file, e.g. http://mail-archives.apache.org/mod_mbox/zookeeper-bookkeeper-dev/201411.mbox http://download.gmane.org/gmane.linux.kernel.rpi/0/2000

## Expected output

  • percentage of messages / domain
  • message size (without quotes) / domain
  • quote percentage / domain

### Example output If you format the output differently it is also ok. “` Total message count / domain: ---------Domain--------------------------------+–Msg-+-Percentage-+

1@gmail.com50020.50 %
2@apache.org40315.32 %

10@hotmail.com502.05 %

-----------------------------------------------+------+------------+

other200023.52 %

-----------------------------------------------+------+------------+

Total message size / domain ---------Author-------------------------------------------+-KBytes-+

1@gmail.com453.2
2@apache.org345.8

10@hotmail.com201.9

----------------------------------------------------------+--------+ “`

## Environment

Runs from the command line

File for analysis is given as first argument

e.g. `create_mbox_stats 201411.mbox`

Output is written to stdout.

## Time: Three hours.