Giter VIP home page Giter VIP logo

typer's Introduction

Typer

Typing test in your terminal

Typer Banner

Installation

To just install typer simply use this command:

go install github.com/maaslalani/typer@latest

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

To change the length of the typing test, use the --length flag.

typer -l 20

To set min word length, you can use --min-word-length flag.

typer --min-word-length 5

There is no maximum value, but anything below 1 will count as no min length.

You can use Monkeytype as a source of words, just pass -m, --monkeytype flag, by default it'll use english dictionary, you can change that by adding --monkeytype-language string flag.

typer -m --monkeytype-language code_go

see: monkeytype/languages/_list.json

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

typer -f filename.txt

You can also pipe data by stdin.

echo 'Text from stdin!' | typer

Themes

There is basic theme support, theme should be saved in config file (default $HOME/.typer.yaml) and should look similar to this default theme:

theme:
  #file: /an/absoulute/path/to/the/theme.yaml # if set, it will ignore everything below
  bar:
    color: '#4776E6' # basic color of the progressbar
    #gradient: '#ff0000' # if passed, will generate a gradient from previous color to this one
  graph:
    # see: https://pkg.go.dev/github.com/guptarohit/asciigraph#AnsiColor
    # see: https://github.com/guptarohit/asciigraph/blob/master/color.go#L152-L292
    color: blue # does not use rgb but rather ANSI codes
    height: 3   # height of the graph
  text:
    error: # color when misspelled
      background: '#f33'
      foreground: '#fff'
    typed: # color when character have been typed
      foreground: '#fff'
      #background: '#000' # optional, default theme does not add background
    untyped: # color when still haven't been typed
      foreground: '#555'
      #background: '#000' # optional, default theme does not add background

Demo

typer

typer's People

Contributors

maaslalani avatar happyrip avatar robopuff avatar paarthmadan 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.