Typing test in your terminal

Typer

Typing test in your terminal

Typer Banner

Installation

go get github.com/maaslalani/typer/cmd/typer

Usage

To begin a typing test simply type typer. This will generate random words for you to type and show you your WPM score.

typer

If you want to provide your own text, you can pass in a file name. The typing test will use the contents of the specified file.

typer filename.txt

You can also use any arbitrary command, for example curling text from the internet to practice on.

typer $(curl -s https://loripsum.net/api)

Demo

typer

Development

make
Comments
  • Support for themes, monkeytype and graphs

    Support for themes, monkeytype and graphs

    This PR adds multiple improvements:

    • New WPM graph (using guptarohit/asciigraph)
      • Solves #3
    • New filter for minimum word length
    • Added error on the empty list (can occur after min word length is used)
    • Support for languages/dictionaries from monkeytype (read from GitHub repo)
      • More words and different dictionaries, including code-related, doesn't produce sentences
    • Support for themes and overall ability to change colors of text, progress bar, and graph
      • I personally had an issue with default untyped text being unreadable, this fixes it and adds a bit of funk

    Cheers :)

  • Read text from `stdin`

    Read text from `stdin`

    I added functionality to enable piping text into typer instead of having to rely on babble or an input file, as specified in #2 typer

    I also changed default -c and -p flags functionality to work more intuitively. typer2

  • Cobra CLI

    Cobra CLI

    Implemented Cobra CLI based on response to my previous pull request

    Usage:

    • typer is used to generate random words by default.

    • --file / -f followed by filename is used to read input from file instead.

    • --length / -l followed by an integer is used to set number of max words, by default is set to max int value.

    • --capital / -c is used to indicate that the user wants to include capital letters from text, by default capital letters are changed to lowercase.

    • --punctuation / -p is used to indicate that the user wants to include punctuation from text, by default punctuation is removed.

    All groups of whites pace characters are replaced with a single space character by design.

    The app lacks description to be included with Cobra, it needs your touch imho.

    Licensing was changed to Cobra's license, don't know how to resolve that tbf.

    edit: Wasn't able to link related issue

  • added flags

    added flags

    I added flag functionality to the program. Basically it allows you to modify input without the need to do it manually. Flags have their descriptions, long and short form.

    Basic usage:

    • Flags have to be given before the rest of the arguments, which become tail, or they wont work.

      • typer -l 50 file1.txt -r this example would not work, because -r is given after filename and would be included in os.Args() instead of being considered as flag
    • typer -l 50 -r file1.txt file2.txt would randomize the imput from both files and limit words to 50

    • typer -shf file1.txt -shf file2.txt file3.txt would shuffle the words only in files 1 and 2 (separately) and add file3 in the end.

    It is not 100% tested yet, but for now $(curl ...) isn't supported yet (need to read files or read text from terminal if an argument is not a path).

    Please let me know if you would even consider a functionality like this for me to work further on it. Also, please give me feedback as it is my first pull request, I hope I did well.

    Cheers

  • Panics if /usr/share/dict/words not found

    Panics if /usr/share/dict/words not found

    Describe the bug Running with no args on arch linux I don't have the "words" package installed. I get a panic. Not a big deal and easily worked around but a clear error message or even a small fallback list of words baked into the exe might be more graceful.

    To Reproduce Steps to reproduce the behavior: Install typer on arch linux without the "words" package. Run it with no arguments.

    Expected behavior Fall back to some other word list, or print a simple error message.

    Screenshots

    ❯ typer
    panic: open /usr/share/dict/words: no such file or directory
    
    goroutine 1 [running]:
    github.com/tjarratt/babble.readAvailableDictionary()
            /home/plyons/go/pkg/mod/github.com/tjarratt/[email protected]/babble_unix.go:14 +0x9c
    github.com/tjarratt/babble.NewBabbler(...)
            /home/plyons/go/pkg/mod/github.com/tjarratt/[email protected]/babble.go:22
    github.com/maaslalani/typer/pkg/utility.RandomWords(0x14)
            /home/plyons/go/pkg/mod/github.com/maaslalani/[email protected]/pkg/utility/utility.go:19 +0x6f
    github.com/maaslalani/typer/pkg/typer.FromRandom(0xc000010010, 0x6f95c8)
            /home/plyons/go/pkg/mod/github.com/maaslalani/[email protected]/pkg/typer/typer.go:54 +0x1e
    github.com/maaslalani/typer/cmd.glob..func1(0x94d660, {0x6f6873, 0x0, 0x0})
            /home/plyons/go/pkg/mod/github.com/maaslalani/[email protected]/cmd/root.go:58 +0x26b
    github.com/spf13/cobra.(*Command).execute(0x94d660, {0xc000012200, 0x0, 0x0})
            /home/plyons/go/pkg/mod/github.com/spf13/[email protected]/command.go:856 +0x5f8
    github.com/spf13/cobra.(*Command).ExecuteC(0x94d660)
            /home/plyons/go/pkg/mod/github.com/spf13/[email protected]/command.go:960 +0x3ad
    github.com/spf13/cobra.(*Command).Execute(...)
            /home/plyons/go/pkg/mod/github.com/spf13/[email protected]/command.go:897
    github.com/maaslalani/typer/cmd.Execute()
            /home/plyons/go/pkg/mod/github.com/maaslalani/[email protected]/cmd/root.go:68 +0x25
    main.main()
            /home/plyons/go/pkg/mod/github.com/maaslalani/[email protected]/main.go:6 +0x17
    

    Desktop (please complete the following information):

    • OS: arch linux

    Additional context Add any other context about the problem here.

  • Typing test can be finished with incorrect characters

    Typing test can be finished with incorrect characters

    typer should check if all characters that were captured are valid, before finishing the test. Characters highlighted red are not counted towards WPM score, but don't block from test finishing. typer

  • Prodive own UI

    Prodive own UI

    Is your feature request related to a problem? Please describe. I want to use the business logic you have implemented but do not want to use it in the terminal. I want to build my own UI arround the logic

    Describe the solution you'd like I would like an Interface for UI Outputs which can be injected

    Does anyone have some suggestions ? I did a quick code check and could not determine a clear seperation from business logic and UI representation. Am I wrong ?

  • Incorrect measurement of time

    Incorrect measurement of time

    For now time is measured from the start of the program, I think to measure WPM correctly it should be measured from the first keystroke.

    For now WPM is calculated using equation like this:

    (model.Score / charsPerWord) / (time.Since(m.Start).Minutes())
    
  • cliargs

    cliargs

    • added flags
    • minor bugfix
    • Delete test.txt
    • implemented CLI using Cobra
    • minor bugfix
    • removed old files
    • update
    • Update utility.go
    • review addressed
    • back to mit
    • word limits set
    • Changes
  • Read text from `stdin` for typing test

    Read text from `stdin` for typing test

    Currently typer only allows random words that are generated to be used as the typing test. It would be really nice if a user could provide their own text from a file or piped in from another program.

    Example:

    curl https://www.random.text/lorem.txt | typer
    
    cat random.txt | typer
    
  • Unicode text, change wrong letter to text instead of typed

    Unicode text, change wrong letter to text instead of typed

    • Fixes #18
      • Changed text and typed from string to []rune
    • Changes wrong typed character to correct one, while keeping colors of error (makes corrections easier to do)
  • Use our own random word generator

    Use our own random word generator

    Replace https://github.com/tjarratt/babble with a more domain specific word generator.

    Our replacement should:

    • [ ] Create sentences (with punctuation)
    • [ ] Have configurable word length (character limit)
    • [ ] Priority letters (if we want all words to include a certain letter for training like keybr.com does.
Typistone - Typing races in your terminal

typistone (WIP) A typeracer clone for the terminal users. Usage go run . and th

Apr 12, 2022
tfacon is a CLI tool for connecting Test Management Platforms and Test Failure Analysis Classifier.

Test Failure Classifier Connector Description tfacon is a CLI tool for connecting Test Management Platforms and Test Failure Analysis Classifier. Test

Jun 23, 2022
Test-app-url-shortner - A sample url shortener app to test Keploy integration capabilities
Test-app-url-shortner - A sample url shortener app to test Keploy integration capabilities

test-app-url-shortner A sample url shortener app to test Keploy integration capa

Jan 23, 2022
Go-test-app - Test application to verify environment deployment and reachability over HTTP

Test app Test application to verify environment deployment and reachability over

May 23, 2022
Pi-fetch - get a summary of your pi-hole stats from your terminal

pi-fetch get a summary of your pi-hole stats from your terminal _ ___ _ _ ___|_|___| _|___| |_ ___| |_ | . | |___| _| -_| _

Jan 9, 2022
Stonks is a terminal based stock visualizer and tracker that displays realtime stocks in graph format in a terminal.
Stonks is a terminal based stock visualizer and tracker that displays realtime stocks in graph format in a terminal.

Stonks is a terminal based stock visualizer and tracker. Installation Requirements: golang >= 1.13 Manual Clone the repo Run make && make install Pack

Dec 16, 2022
wy : a set of command-line tools to test your container-based platform

wy wy (Abbreviation of Would You) is a set of command-line tools to test your container-based platform. ToC: Commands Deployment Monitoring Contributi

Apr 30, 2022
Are you programming and suddenly your stomach is rumbling? No problem, order your Ifood without leaving your favorite text editor ❤️

vim-ifood Você ta programando e de repente bateu aquela fome? Sem problemas, peça seu Ifood sem sair do seu editor de texto favorito ❤️ Are you progra

Jun 2, 2022
gomerge is a tool to quickly bulk merge several pull requests from your terminal.
gomerge is a tool to quickly bulk merge several pull requests from your terminal.

Gomerge is a tool to quickly enable you to bulk merge Github pull requests from your terminal. The intention of this tool is to simplfy, and eventually automate the merging of github pull requests. This tool should be able to run on most systems.

Dec 28, 2022
YouTube client on your terminal

MeowTube YouTube client on your terminal Table of Contents About Getting Started Usage Contributing About MeowTube is a CLI (Command Line Interface) t

Jul 29, 2022
🎄 A Christmas tree right from your terminal!
🎄 A Christmas tree right from your terminal!

ctree ?? A Christmas tree right from your terminal! ?? Demo ⌛ No Refresh Don't want the tree to refresh every 2 seconds? Easy! Just add the --no-refre

Dec 20, 2022
❓🖼 Find the anime scene by image using your terminal
❓🖼 Find the anime scene by image using your terminal

What Anime CLI ❓ ?? > This application is basically a ?? wrapper around trace.moe PREVIEW Usage ?? Get Anime By Image File ?? what-anime file anime.jp

Jan 2, 2023
Pi-hole data right from your terminal. Live updating view, query history extraction and more!
Pi-hole data right from your terminal. Live updating view, query history extraction and more!

Pi-CLI Pi-CLI is a command line program used to view data from a Pi-Hole instance directly in your terminal.

Dec 12, 2022
Draw images in your ANSI terminal with true color
Draw images in your ANSI terminal with true color

___ _____ ____ / _ \/ _/ |/_/ /____ ______ _ Made with love by Eliuk Blau / ___// /_> </ __/ -_) __/ ' \ https://github.com/eliukblau/pix

Dec 14, 2022
The personal information dashboard for your terminal
The personal information dashboard for your terminal

WTF (aka 'wtfutil') is the personal information dashboard for your terminal, providing at-a-glance access to your very important but infrequently-need

Dec 31, 2022
Advanced ANSI style & color support for your terminal applications
Advanced ANSI style & color support for your terminal applications

termenv lets you safely use advanced styling options on the terminal. It gathers information about the terminal environment in terms of its ANSI & col

Dec 31, 2022
GIFs in your terminal
GIFs in your terminal

gifwrap GIFs in your terminal. Install Download the latest binary or install with Go: go install github.com/liamg/gifwrap/cmd/gifwrap@latest Usage Usa

Jan 2, 2023
Share your terminal as a web application
Share your terminal as a web application

GoTTY - Share your terminal as a web application GoTTY is a simple command line tool that turns your CLI tools into web applications. Installation Dow

Jan 8, 2023
🐙🐱🖥️ GitHub stats in your terminal
🐙🐱🖥️ GitHub stats in your terminal

?? ?? ??️ octotui - GitHub stats in terminal Inspired by metrics & github-profile-summary-cards & github-tui ?? Data - irevenko/octostats TUI - termui

Dec 25, 2022