Conversation
typetesting.sh
Outdated
| @@ -0,0 +1,55 @@ | |||
| #!/bin/bash | |||
|
|
|||
| goal_text="innovation distinguishes between a leader and a follower, and the code we write today becomes the foundation for the intelligence of tomorrow." | |||
There was a problem hiding this comment.
https://github.com/monkeytypegame/monkeytype/blob/master/frontend/static/languages/english_5k.json
fetch words list from here and cache it somewhere(probably somewhere like ~/.local/share/typetest). Fetch words from that file and randomly permute them using shuf . Also, let the user configure how many words they want in the test. If they don't specify a word count then keep a default hardcoded word count
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
|
Make the interface a TUI that shows the word progress by highlighting different characters. I'm looking for something like this . Doesn't have to be exactly like this but it should show the progress by highlighting characters using ANSI codes List of other stuff to do if you get time after making the TUI: #9 (comment) |
|
Good work on the writeups, they look well made |
|
|
Nice work on the TUI, theres a couple of other things to do:
|
typetesting.sh
Outdated
| @@ -0,0 +1,151 @@ | |||
| 640b964#!/bin/bash | |||
There was a problem hiding this comment.
Why did you add the string before the shebang?
Remove it if it's accidental.
There was a problem hiding this comment.
by mistake! it was a commit i was trying to reset
There was a problem hiding this comment.
Add a --help which prints the optional args and their possible value.
typetesting.sh
Outdated
|
|
||
| # generate words | ||
| generate_words() { | ||
| count=$1 |
There was a problem hiding this comment.
It's a good practice to make them local variables using local if they're not going to be used elsewhere
typetesting.sh
Outdated
| # draw screen | ||
| render() { | ||
|
|
||
| clear |
There was a problem hiding this comment.
Not a good idea. The whole thing flickers as it renders everything again even as I type a single letter
A better idea would be to use tput cup 0 0 (puts the terminal cursor back to (0,0) without clearing the screen)
Smoother render
There was a problem hiding this comment.
@TanmayArya-1p @Shashank-k15 might have some better ideas
Added assignment 1