Gangmax Blog

A Summary of My Past Posts

Today I suddenly want to know how many posts I posted in the past year. I used the following commands:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
user@user-ubuntu:~/octopress$ ls source/_posts/2012* | wc -l
114
user@user-ubuntu:~/octopress$ ls source/_posts/2011* | wc -l
96
user@user-ubuntu:~/octopress$ ls source/_posts/2010* | wc -l
30
user@user-ubuntu:~/octopress$ ls source/_posts/2009* | wc -l
16
user@user-ubuntu:~/octopress$ ls source/_posts/2008* | wc -l
20
user@user-ubuntu:~/octopress$ ls source/_posts/2007* | wc -l
39
user@user-ubuntu:~/octopress$ ls source/_posts/2006* | wc -l
44
user@user-ubuntu:~/octopress$ ls source/_posts/2005* | wc -l
5
user@user-ubuntu:~/octopress$ ls source/_posts/2004* | wc -l
ls: Cannot access source/_posts/2004*: No such file or directory
0
user@user-ubuntu:~/octopress$ ls source/_posts/2003* | wc -l
ls: Cannot access source/_posts/2003*: No such file or directory
0
user@user-ubuntu:~/octopress$ ls source/_posts/2002* | wc -l
ls: Cannot access source/_posts/2002*: No such file or directory
0
user@user-ubuntu:~/octopress$ ls source/_posts/2001* | wc -l
1

This gives me the overall sight of what I have posted during the past years. A more intuitive view created by using gem “googlechart“ to generate a bar chart:

1
2
3
4
5
6
require 'gchart'
Gchart.bar(:size => '400x300',
:max_value => 200,
:data => [1, 0, 0, 0, 5, 44, 39, 20, 16, 30, 96, 114],
:axis_with_labels => 'x',
:axis_labels => ['2001', '2002', '2003', '2004', '2005', '2006', '2007', '2008', '2009', '2010', '2011', '2012'])

Then you can get a bar chart like below:

Summary Chart

Comments