From 647aa2c71418b5aebe21293e5f4964401ebd96c8 Mon Sep 17 00:00:00 2001 From: Doman Date: Thu, 3 Feb 2022 13:49:08 +0100 Subject: [PATCH] bump example in readme --- README.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 03146ea..cd8cb1a 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ You can use another similar projects set of words as well, for example to create `curl -s https://raw.githubusercontent.com/Miodec/monkeytype/master/static/languages/english.json | python3 -c "import sys, json; print('\n'.join(json.load(sys.stdin)['words']))" | shuf -n20 | python3 -m fasttyper` -To exit program simply complete test or press CTRL+C. +To exit you can either finish test, use `KeyboardInterrupt` (CTRL+C) or tap **tab** then **enter**. ## Example scripts @@ -47,9 +47,13 @@ function ff() { 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 + while true + do + shuf -n $amount $sfile | python3 -m fasttyper + sleep 1 + done } ``` `ff 50 english_1k` -This shell function shuffles N words from cached word list, and if given word list doesnt exist it download's it. +This shell function shuffles N words from cached word list, and if given word list doesnt exist it download's it. It runs in loop, but does sleep 1s after each taken test (or interrupted!) so to exit loop just use CTRL+C twice: once to exit fasttyper, second time to exit loop on sleep.