max-niederman / ttyper

Terminal-based typing test.
MIT License
1.09k stars 76 forks source link

[Feature Request] Import quotes or paragraph from json file or standard output. #122

Closed amalgame21 closed 5 months ago

amalgame21 commented 5 months ago

Like the project in https://github.com/lemnos/tt Default quote can be imported by tt -quotes en, (imported from file) Also it can fetch quotes by

              curl https://api.quotable.io/quotes|\
                  jq '[.results[]|.text=.content|.attribution=.author][:2]'|\
                  tt -quotes - -norreport -csv`

(imported from stdout) That means we can custom make any quote in json as we wish.

max-niederman commented 5 months ago

So, ttyper doesn't have a special UI for displaying attributed quotes, but you can import any test from standard input. For example,

curl https://quotes-api-self.vercel.app/quote | jq -r ".quote" | ttyper -

I'm considering adding a special UI in v2, but I don't think it's worth the added complexity for v1.