Skip to content

Commit

Permalink
0.1.0 alpha (#20)
Browse files Browse the repository at this point in the history
* fix startup issue on go get

* update docs for installation

* add example.gif

* add gif to readme

* update gif url

* update readme
  • Loading branch information
jan25 authored Jul 7, 2019
1 parent c990897 commit 1fe13e9
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 10 deletions.
15 changes: 9 additions & 6 deletions NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,18 @@
- Used to show help text that displays the ui controls
- Ctrl+x can expand/collapse this view


- Data directory
- All data related to termracer is put under $HOME/termracer
- This directory contains
- samples
- log file
- racehistory file

TODO
- Known issues
- Fix NaN Accuracy
- Remove cursor from word view when race finished

- Write/Read stats to local file
- Convert stats table into widget so we can scroll through historical stats
- Only one paragraph support on master build
- Need to get rid of server and generate paragraphs on the fly

- need to arrange words properly in para view. algorithm to adjust spacing? just look for library
- How about a dashboard to submit book urls to generate samples?

Expand Down
22 changes: 20 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,25 @@
# termracer
Practise your typing skills from within your terminal. This app is inspired by various online typing tutor websites.
Practise your typing skills from within your terminal. termracer is inspired by various online typing tutor websites.

This application is very much in development. I'll update this README according to when this app is ready to be used.
Your goal is to type a given paragraph as fast and accurate as possible, termracer will calculate your typing speed with words per minute and accuracy % metrics. You can also view your progress by viewing the past race results.

![](https://github.com/jan25/termracer/blob/master/example.gif)

## Install

```
# download and install
$ go get -u github.com/jan25/termracer
# run application
# if $GOPATH/bin is in $PATH
$ termracer
# OR
$ $GOPATH/bin/termracer
```

> Current version of termracer can't generate paragraphs and pick an interesting paragraph for a race. We only have one default paragraph that is used for all races. In upcoming versions, termracer will be able to choose a random and interesting paragraphs for you.
## Development
This application uses go modules. So, you could clone this repo under any
Expand Down
Binary file added example.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions lib.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,16 @@ func ChooseParagraph() (string, error) {
Logger.Info("Falling back to default paragraph")
// TODO remove this temporary fix
// returning const paragraph if couldn't reach server
return firstParagraph, nil;
return firstParagraph, nil
}
return p, nil
}

// GenerateLocalParagraphs checks if samples/use has > 0 paragraphs
// available. If not tries to generate them
func GenerateLocalParagraphs() error {
files, err := ioutil.ReadDir("server/samples/use")
d, _ := GetSamplesUseDir()
files, err := ioutil.ReadDir(d)
if err != nil {
return errors.New("failed to read use directory")
}
Expand Down

0 comments on commit 1fe13e9

Please sign in to comment.