added example
This commit is contained in:
parent
25929cc021
commit
0551468a45
1 changed files with 10 additions and 0 deletions
10
examples/fasttyper.sh
Normal file
10
examples/fasttyper.sh
Normal file
|
@ -0,0 +1,10 @@
|
|||
# fasttyper
|
||||
function ff() {
|
||||
mkdir -p ~/.cache/fasttyper
|
||||
local amount="${1:-50}"
|
||||
local language="${2:-english}"
|
||||
local sfile=~/.cache/fasttyper/$language
|
||||
local source_path=https://raw.githubusercontent.com/Miodec/monkeytype/master/static/languages/$language.json
|
||||
[[ ! -f $sfile ]] && curl -s $source_path | python3 -c "import sys, json; print('\n'.join(json.load(sys.stdin)['words']))" > $sfile
|
||||
shuf -n $amount $sfile | python3 -m fasttyper
|
||||
}
|
Loading…
Reference in a new issue