2019-10-12 14:55:38 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -o errexit
|
|
|
|
set -o nounset
|
|
|
|
set -o pipefail
|
|
|
|
|
|
|
|
function fetch_top_authors() {
|
|
|
|
local basedir
|
|
|
|
local filter
|
|
|
|
basedir=$(dirname "$0")
|
|
|
|
filter="${1:-}"
|
|
|
|
|
2021-07-05 09:08:59 +00:00
|
|
|
grep http "$basedir/README.md" "$basedir/sections/"*.md | grep -i "${filter}" | cut -d '[' -f 2 | cut -d ']' -f 1 | sed 's/\*//g' | grep -v "/" | sort | uniq -c | sort -n
|
2019-10-12 14:55:38 +00:00
|
|
|
}
|
|
|
|
fetch_top_authors "$@"
|