]> gitweb.factorcode.org Git - factor.git/commitdiff
contributors: merge the known contributor aliases
authorAlexander Iljin <ajsoft@yandex.ru>
Sun, 23 Aug 2020 15:26:25 +0000 (17:26 +0200)
committerJohn Benediktsson <mrjbq7@gmail.com>
Tue, 17 Nov 2020 03:27:10 +0000 (03:27 +0000)
extra/contributors/contributors.factor

index fb19ce7fcd8de8c94138321b0e51de771d0df3fb..c73cd3e58f7b69b2e93a36621360f95061a405f4 100644 (file)
@@ -1,17 +1,37 @@
-! Copyright (C) 2007, 2008 Slava Pestov.
+! Copyright (C) 2007, 2008 Slava Pestov, 2020 Alexander Ilin.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: io io.directories io.encodings.utf8 io.launcher io.pathnames
-math.statistics prettyprint sequences sorting system ;
+USING: assocs fry io io.directories io.encodings.utf8
+io.launcher io.pathnames kernel math.statistics prettyprint
+sequences sorting system ;
 IN: contributors
 
+CONSTANT: aliases {
+    { "Björn Lindqvist" "bjourne@gmail.com" }
+    { "Cat Stevens" "catb0t" }
+    { "Daniel Ehrenberg" "Dan Ehrenberg" }
+    { "Doug Coleman" "U-FROGGER\\erg" "erg" }
+    { "Erik Charlebois" "erikc" }
+    { "KUSUMOTO Norio" "kusumotonorio" }
+    { "Mighty Sheeple" "sheeple" "U-ENCHILADA\\sheeple" }
+    { "Nicolas Pénet" "nicolas-p" }
+    { "Slava Pestov" "slava" "Slava"
+        "U-SLAVA-FB3999113\\Slava" "U-SLAVA-DFB8FF805\\Slava" }
+    { "dharmatech" "U-CUTLER\\dharmatech" }
+}
+
 : changelog ( -- authors )
     image-path parent-directory [
         "git log --no-merges --pretty=format:%an"
         utf8 [ lines ] with-process-reader
     ] with-directory ;
 
+: merge-aliases ( authors -- authors' )
+    aliases [
+        unclip '[ over delete-at* [ _ pick at+ ] [ drop ] if ] each
+    ] each ;
+
 : contributors ( -- )
-    changelog histogram
+    changelog histogram merge-aliases
     sort-values <reversed>
     simple-table. ;