factor/extra/contributors/contributors.factor

29 lines
779 B
Factor
Raw Normal View History

2007-09-20 18:09:08 -04:00
! Copyright (C) 2007 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
2007-10-08 22:28:22 -04:00
USING: io.files io.launcher io.styles io hashtables kernel
sequences combinators.lib assocs system sorting math.parser ;
2007-09-20 18:09:08 -04:00
IN: contributors
2007-10-08 22:28:22 -04:00
: changelog ( -- authors )
2007-11-05 00:46:03 -05:00
image parent-directory cd
2007-10-08 22:28:22 -04:00
"git-log --pretty=format:%an" <process-stream> lines ;
2007-09-20 18:09:08 -04:00
: patch-counts ( authors -- assoc )
2007-10-08 22:28:22 -04:00
dup prune
[ dup rot [ = ] curry* count ] curry*
{ } map>assoc ;
2007-09-20 18:09:08 -04:00
: contributors ( -- )
2007-10-08 22:28:22 -04:00
changelog patch-counts sort-values <reversed>
2007-09-20 18:09:08 -04:00
standard-table-style [
[
[
2007-10-08 22:28:22 -04:00
first2 swap
2007-09-20 18:09:08 -04:00
[ write ] with-cell
[ number>string write ] with-cell
] with-row
] each
] tabular-output ;
MAIN: contributors