factor/extra/contributors/contributors.factor

24 lines
629 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.
2008-11-30 19:04:44 -05:00
USING: io.files io.launcher io.styles io.encodings.ascii
prettyprint io hashtables kernel sequences assocs system sorting
2008-05-07 06:14:25 -04:00
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 [
2008-11-17 21:28:52 -05:00
"git log --pretty=format:%an" ascii <process-reader> 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