maaslalani / typer Goto Github PK
View Code? Open in Web Editor NEWTyping test in your terminal
License: MIT License
Typing test in your terminal
License: MIT License
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())
Is your feature request related to a problem? Please describe.
Quotations can be used from monkeytype repository using quotes folder instead of languages folder
Describe the solution you'd like
The -q flag can be used with -m
Describe alternatives you've considered
Additional context
I'm planning to create a pr for this
In the future, if we want to have configuration files and flags using https://github.com/spf13/cobra would be pretty useful.
Describe the bug
typer panics with umlauts
To Reproduce
Steps to reproduce the behavior:
echo "ä" | typer
Desktop (please complete the following information):
It should be
go get github.com/maaslalani/typer/cmd/typer
instead of
go get github.com/maaslalani/typer
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):
Additional context
Add any other context about the problem here.
Replace https://github.com/tjarratt/babble with a more domain specific word generator.
Our replacement should:
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 ?
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
typer
should store the WPM for the user into a plain text file with a timestamp which can be used later to show a graph of WPM scores over time.
We can use https://github.com/guptarohit/asciigraph to plot the ascii graph.
please provide a scoop package for typer .
at window 🙏
Describe the bug
Text colors do not work as intended in Ansi256
To Reproduce
Steps to reproduce the behavior:
theme:
bar:
color: '#555555'
graph:
color: purple
height: 3
text:
error:
foreground: '#FF00000'
background: '#FFFFFF'
typed:
foreground: '#0000FF'
untyped:
foreground: '#555555'
Expected behavior
The configured colors should be approximated for the terminal.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context
I think that the termenv color profile should be used when setting the colors. Will make a PR for this. (Also termenv has had several version changes, and could be updated. Happy to do that if desired.)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.