ewx: (Default)
Richard Kettlewell ([personal profile] ewx) wrote2008-07-20 06:40 pm
Entry tags:

A bit over a decade of mail

This is the number of mail messages I actually saved per month; so it exclude spam and cron junk, and also excludes news postings. It does include LJ comments, starting from mid 2002.

[identity profile] gareth-rees.livejournal.com 2008-07-21 06:26 pm (UTC)(link)
This was produced by running
find ~/Library/Mail -name '*.emlx' -print0 |
xargs -0 grep -h -m 1 ^Date: |
perl -ne 'use Date::Parse; s/Date: //; @d = strptime($_); $y=$d[5]+1900; printf "%d %02d\n",$y,$d[4] if 1990<$y and $y<=2008;' |
sort |
uniq -c > messages-per-month
gnuplot <<'END'
set term aqua
set size 0.8,0.4
plot 'messages-per-month' using ($2+($3-1)/12):1 title "Messages per month" with line
END
If you don't use Apple Mail you'll need to change the find and grep commands, and if you have a different way of getting pictures out of gnuplot you'll need to specify a suitable output terminal.