From 60c0c1e6ccad41190dfe1f7dbd47a7d1974427d0 Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Fri, 10 Aug 2018 16:22:56 +0200 Subject: Update readme Update configuration summary --- tools/gen_authors.rb | 18 ------------------ tools/list-authors.sh | 12 ++++++++++++ 2 files changed, 12 insertions(+), 18 deletions(-) delete mode 100755 tools/gen_authors.rb create mode 100755 tools/list-authors.sh (limited to 'tools') diff --git a/tools/gen_authors.rb b/tools/gen_authors.rb deleted file mode 100755 index 96f2679..0000000 --- a/tools/gen_authors.rb +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env ruby -# Generate list of authors from repository commits - -log = `hg log --template='{author}'%` - -authors = Hash.new(0) -log.split('%').each do |i| - authors[i] += 1 -end - -# sort list by descending number of commits -authors = authors.sort_by {|k, v| v}.reverse - -# print out authors -authors.each do |k, v| - #print " #{k} (#{v})\n" - print " #{k}\n" -end diff --git a/tools/list-authors.sh b/tools/list-authors.sh new file mode 100755 index 0000000..430d4a9 --- /dev/null +++ b/tools/list-authors.sh @@ -0,0 +1,12 @@ +#!/usr/bin/bash + +# git shortlog: +# -s (--summary): suppress commit description +# -n (--numbered): sort according to number of commits per author +# -e (--email): show email address of author + +# sed: +# replace (any spaces)(any numbers)(any spaces) with ' - ' +# this replaces the commit numbers and turns it into a bullet list +git shortlog -sne $1 | sed -e 's/^\s*[0-9]*\s*/ - /g' + -- cgit v1.2.1