Update contributors
parent
202f7cdfff
commit
073bca9100
|
@ -1,29 +1,24 @@
|
||||||
! Copyright (C) 2007 Slava Pestov.
|
! Copyright (C) 2007 Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: memory io io.files io.styles io.launcher
|
USING: io.files io.launcher io.styles io hashtables kernel
|
||||||
sequences prettyprint kernel arrays xml xml.utilities system
|
sequences combinators.lib assocs system sorting math.parser ;
|
||||||
hashtables sorting math.parser assocs ;
|
|
||||||
IN: contributors
|
IN: contributors
|
||||||
|
|
||||||
: changelog ( -- xml )
|
: changelog ( -- authors )
|
||||||
image parent-dir cd
|
image parent-dir cd
|
||||||
"darcs changes --xml-output" <process-stream> read-xml ;
|
"git-log --pretty=format:%an" <process-stream> lines ;
|
||||||
|
|
||||||
: authors ( xml -- seq )
|
|
||||||
children-tags [ "author" swap at ] map ;
|
|
||||||
|
|
||||||
: patch-count ( authors author -- n )
|
|
||||||
[ = ] curry subset length ;
|
|
||||||
|
|
||||||
: patch-counts ( authors -- assoc )
|
: patch-counts ( authors -- assoc )
|
||||||
dup prune [ [ patch-count ] keep 2array ] curry* map ;
|
dup prune
|
||||||
|
[ dup rot [ = ] curry* count ] curry*
|
||||||
|
{ } map>assoc ;
|
||||||
|
|
||||||
: contributors ( -- )
|
: contributors ( -- )
|
||||||
changelog authors patch-counts sort-keys <reversed>
|
changelog patch-counts sort-values <reversed>
|
||||||
standard-table-style [
|
standard-table-style [
|
||||||
[
|
[
|
||||||
[
|
[
|
||||||
first2
|
first2 swap
|
||||||
[ write ] with-cell
|
[ write ] with-cell
|
||||||
[ number>string write ] with-cell
|
[ number>string write ] with-cell
|
||||||
] with-row
|
] with-row
|
||||||
|
|
Loading…
Reference in New Issue