I am LAZY bones? AN ancient AND boring SITE

2009年 10月 09日 的归档

谁在我blog里留言最多呢?

今天备份blog数据的时候,突然想了解一下,谁在我blog里留言最多呢?
这样不仅可以满足自己的好奇心,还可以更好地做好读者回访工作,哈哈。
于是,在WP的后台里导出xml的备份数据以后,来了这么一行,如果你用的于是WordPress,那也可以做为参考哦:

grep "wp:comment_author_url" wordpress.2009-10-09.xml | awk -F"[<>]" '$3{A[$3]++}END{for(k in A)print A[k],k}' | sort -nr | head -n 30

或者是贴出来的加上链接的形式:

grep "wp:comment_author_url" wordpress.2009-10-09.xml | awk -F"[<>]" '$3{A[$3]++}END{for(k in A)printf("%02d <a href=\"%s\">%s</a>\n",A[k],k,k)}' | sort -nr | head -n 30

以下就是我blog的结果(已经人工去掉了自己和无意义的数据):

68 http://imtx.cn
47 http://joolix.com
41 http://www.sxnsx.com
29 http://hi.baidu.com/tpxc
23 http://oceanboo.cn
22 http://wdicc.com
20 http://lfeng.cn
19 http://young001.blogbus.com
18 http://frankyue.cn
17 http://millenniumdark.blog.ubuntu.org.cn/
15 http://zhan.blog.ubuntu.org.cn/
15 http://blog.imxifs.cn
13 http://www.ownlinux.cn/
12 http://www.kissuki.com/
12 http://muzuiget.blog.ubuntu.org.cn/
11 http://www.hicrokee.com
09 http://lerosua.org
08 http://www.ownlinux.cn
07 http://www.imkeke.net
07 http://ivenvd.blogspot.com/
06 http://tianhao.blog.ubuntu.org.cn/
06 http://maclpashideout.blogspot.com/
06 http://classfoo.googlepages.com
05 http://www.w3rep.cn/blog
05 http://www.shuge.org/lee
05 http://www.joolix.com
05 http://www.imkeke.net/
05 http://raychen1984.cublog.cn/
04 http://yegle.net
04 http://www.imchao.net

当然,这样就直接忽略掉了没有url字段的评论,如果你不想这样的话,也可以根据wp:comment_author字段来进线昵称的统计。