Skip to main content

Minimalistic typing exercise

Project description

fasttyper

About

Fasttyper is minimalistic typing test based on user provided exercising text. It supports both reading from text files and stdin supporting wide range of usecases. The goal was to create it as simple as it can be, without any additional bloatware functionalities. That means that Fasttyper doesn't come with build in test generator and you have to provide your own scripts generating tests. Some examples of such scrips are providen in Usage section.

Installation

Fasttyper is currently maintained on TestPyPi Python Package Index. To install package simpply use:

python3 -m pip install fasttyper

Usage

Fasttyper is ran as an python module, so to execute it simply type:

python3 -m fasttyper

from cloned github repository, if you didn't install package from TestPyPi.

Fasttyper can open text files, which path should be provided as first and only argument to the module execution, for example:

python3 -m fasttyper example_text.txt

Program also allows user to pipe text into it. Keep in mind, it only supports spaces and new line characters, so you won't be able to table tabs. For example, you can run Fasttyper on fortune generated quote changing tabulators to spaces with sed:

furtune | python3 -m fasttyper

or if you want to randomize words from given file with shuf on for example all disctionaries in system:

shuf -n5 /usr/share/dict/* | python -m fasttyper

You can use another similar projects set of words as well, for example to create test with 20 random words from Monkeytype's english 100 dictionary use:

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.

Example scripts

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
}

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fasttyper-1.2.0.tar.gz (20.7 kB view details)

Uploaded Source

Built Distribution

fasttyper-1.2.0-py2.py3-none-any.whl (21.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file fasttyper-1.2.0.tar.gz.

File metadata

  • Download URL: fasttyper-1.2.0.tar.gz
  • Upload date:
  • Size: 20.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.7

File hashes

Hashes for fasttyper-1.2.0.tar.gz
Algorithm Hash digest
SHA256 75705e21ef4760574543c3ca44a1a806c8e1e17c0f9ecdd8f39a4c3fc6bfeffd
MD5 8232a22647e49a04046ba66072926dd0
BLAKE2b-256 38ed4fa019ad30ce925ecd8c08bf1727e7a8f91cc2d363414a8367d06848881d

See more details on using hashes here.

File details

Details for the file fasttyper-1.2.0-py2.py3-none-any.whl.

File metadata

  • Download URL: fasttyper-1.2.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 21.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.7

File hashes

Hashes for fasttyper-1.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ba28240926db8ccf25a1ac948eb440b4a665e66444e14b3ae7fe00731c15306f
MD5 595e43809b251407c5e6f010a452835d
BLAKE2b-256 67e48668ea1a35a66b69dd632f59672e8c1f0c1d8c3f289ec0be1ea8f6465789

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page