add feature for filtering top results
This commit is contained in:
parent
5d2a6202f4
commit
e397980803
@ -1,3 +1,14 @@
|
|||||||
#/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
BASEDIR=$(dirname "$0")
|
set -o errexit
|
||||||
grep http "$BASEDIR/README.md" | cut -d '[' -f 2 | cut -d ']' -f 1 | sed 's/\*//g' | grep -v "/" | sort | uniq -c | sort -n
|
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 "$@"
|
||||||
|
Loading…
Reference in New Issue
Block a user