factor/extra/contributors/contributors.factor

24 lines
666 B
Factor
Raw Normal View History

2008-11-30 19:04:44 -05:00
! Copyright (C) 2007, 2008 Slava Pestov.
2007-09-20 18:09:08 -04:00
! See http://factorcode.org/license.txt for BSD license.
USING: io.files io.launcher io.directories io.pathnames
io.encodings.ascii io prettyprint hashtables kernel sequences
assocs system sorting math.parser sets ;
2007-09-20 18:09:08 -04:00
IN: contributors
2007-10-08 22:28:22 -04:00
: changelog ( -- authors )
2008-04-04 10:17:33 -04:00
image parent-directory [
"git log --no-merges --pretty=format:%an" ascii <process-reader> stream-lines
2008-04-04 10:17:33 -04:00
] with-directory ;
2007-09-20 18:09:08 -04:00
: patch-counts ( authors -- assoc )
2007-10-08 22:28:22 -04:00
dup prune
2008-01-09 17:36:30 -05:00
[ dup rot [ = ] with count ] with
2007-10-08 22:28:22 -04:00
{ } map>assoc ;
2007-09-20 18:09:08 -04:00
: contributors ( -- )
2008-11-30 19:04:44 -05:00
changelog patch-counts
sort-values <reversed>
simple-table. ;
2007-09-20 18:09:08 -04:00
MAIN: contributors