GithubHelp home page GithubHelp logo

basil08 / typetest Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mastermedo/typetest

0.0 0.0 0.0 44.56 MB

:chart_with_upwards_trend: Improve your typing speed without leaving the terminal.

License: MIT License

Python 100.00%

typetest's Introduction

Test your typing speed without leaving the terminal.

build license build maintainer

demo

๐Ÿ“‹ description

typetest is a self-contained minimal typing test program written with blessed. As is, it is a near clone of 10fastfingers with an added bonus of being able to see typing speed as you're typing.

โšก features

  1. adjustable settings
  2. storing test results
  3. analysing mistakes
  4. easy to track improvement

๐Ÿ“ˆ analyse test results with typetest-analyse!

wpm char_speeds word_speeds mistypes dist

:shipit: installation

  1. install python3
  2. install pip (python package manager)
  3. run pip install typetest
  4. run typetest

Optionally

  • make an alias for typetest, I use tt
  • run typetest-analyse to get insights

๐Ÿ’ก ideas for tests

Along with typetest this repository features sample tests. Try them like so: typetest -s -d 60 -i common_200 or scrape something off the internet, like a featured article on wikipedia.

#!/usr/bin/env python3
import re
import requests
from bs4 import BeautifulSoup

word_pattern = re.compile(r"['A-Za-z\d\-]+[,\.\?\!]?")  # symbols to keep
url = 'https://en.wikipedia.org/wiki/Special:RandomInCategory/Featured_articles'

r = requests.get(url)
soup = BeautifulSoup(r.text, 'html.parser')
for sup in soup.select('sup'):
    sup.extract()  # remove citations

text = ' '.join(p.text for p in soup.select('p'))
text = re.sub(r'\[.*?\]|\(.*?\)', '', text)  # remove parenthesis
print(' '.join(re.findall(word_pattern, text)))

If you create a file called wiki_random you can start the test with wiki_random | typetest. Write your own scraper, you may find some suggestions here.

โ“ usage

usage: typetest [-h] [-d DURATION] [--hash HASH] [-i INPUT] [-o OUTPUT_DIRECTORY] [-s] [-r ROWS]

optional arguments:
  -h, --help            show this help message and exit
  -d DURATION, --duration DURATION
                        duration in seconds (default: inf)
  --hash HASH           custom hash (generated from input by default)
  -i INPUT, --input INPUT
                        file to read words from (default: sys.stdin)
  -o OUTPUT_DIRECTORY, --output-directory OUTPUT_DIRECTORY
                        file to store results in
                        (default: /home/medo/repos/typetest/typetest/results)
  -s, --shuffle         shuffle words (default: False)
  -r ROWS, --rows ROWS  number of test rows to show (default: 2)

example:
  typetest -i test.txt -s -d 60
  echo 'The typing seems really strong today.' | typetest -d 3.5
  typetest < test.txt

shortcuts:
  ^c / ctrl+c           end the test and get results now
  ^[ / ctrl+[ / esc     end the test and get results now
  ^h / ctrl+h / bksp    delete a character
  ^r / ctrl+r / tab     restart the same test
  ^s / ctrl+s           restart the test with words reshuffled
  ^w / ctrl+w           delete a word
  ^u / ctrl+u           delete a word

Back to top

typetest's People

Contributors

mastermedo avatar nzdjb avatar basil08 avatar dinoosawruss avatar s-surineni avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.