]> gitweb.factorcode.org Git - factor.git/blob - extra/contributors/contributors.factor
97f4edc521f5de13c2feaaa309c62334c58221d5
[factor.git] / extra / contributors / contributors.factor
1 ! Copyright (C) 2007, 2008 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: io.files io.launcher io.directories io.pathnames
4 io.encodings.ascii io prettyprint hashtables kernel sequences
5 assocs system sorting math.parser sets ;
6 IN: contributors
7
8 : changelog ( -- authors )
9     image parent-directory [
10         "git log --no-merges --pretty=format:%an" ascii <process-reader> stream-lines
11     ] with-directory ;
12
13 : patch-counts ( authors -- assoc )
14     dup prune
15     [ dup rot [ = ] with count ] with
16     { } map>assoc ;
17
18 : contributors ( -- )
19     changelog patch-counts
20     sort-values <reversed>
21     simple-table. ;
22
23 MAIN: contributors