contributors: simplify using histogram.
parent
c696d51edb
commit
41fe0673c7
|
@ -1,22 +1,18 @@
|
||||||
! Copyright (C) 2007, 2008 Slava Pestov.
|
! Copyright (C) 2007, 2008 Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: io.files io.launcher io.directories io.pathnames
|
USING: io io.directories io.encodings.ascii io.launcher
|
||||||
io.encodings.ascii io prettyprint hashtables kernel sequences
|
io.pathnames math.statistics prettyprint sequences sorting
|
||||||
assocs system sorting math.parser sets ;
|
system ;
|
||||||
IN: contributors
|
IN: contributors
|
||||||
|
|
||||||
: changelog ( -- authors )
|
: changelog ( -- authors )
|
||||||
image parent-directory [
|
image parent-directory [
|
||||||
"git log --no-merges --pretty=format:%an" ascii <process-reader> stream-lines
|
"git log --no-merges --pretty=format:%an"
|
||||||
|
ascii [ lines ] with-process-reader
|
||||||
] with-directory ;
|
] with-directory ;
|
||||||
|
|
||||||
: patch-counts ( authors -- assoc )
|
|
||||||
dup members
|
|
||||||
[ dup rot [ = ] with count ] with
|
|
||||||
{ } map>assoc ;
|
|
||||||
|
|
||||||
: contributors ( -- )
|
: contributors ( -- )
|
||||||
changelog patch-counts
|
changelog histogram
|
||||||
sort-values <reversed>
|
sort-values <reversed>
|
||||||
simple-table. ;
|
simple-table. ;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue