From 0551468a450f49e2bb1a16889cf0c773b0c2ba80 Mon Sep 17 00:00:00 2001 From: Doman Date: Tue, 13 Jul 2021 19:36:11 +0200 Subject: [PATCH] added example --- examples/fasttyper.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 examples/fasttyper.sh diff --git a/examples/fasttyper.sh b/examples/fasttyper.sh new file mode 100644 index 0000000..05025f1 --- /dev/null +++ b/examples/fasttyper.sh @@ -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 +}