bookmarks/top_authors.sh
2019-10-12 16:55:38 +02:00

15 lines
344 B
Bash
Executable File

#!/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:-}"
grep http "$basedir/README.md" | grep "${filter}" | cut -d '[' -f 2 | cut -d ']' -f 1 | sed 's/\*//g' | grep -v "/" | sort | uniq -c | sort -n
}
fetch_top_authors "$@"