Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Downloading data #1

Open
pkein opened this issue Feb 8, 2016 · 2 comments
Open

Downloading data #1

pkein opened this issue Feb 8, 2016 · 2 comments
Assignees

Comments

@pkein
Copy link

pkein commented Feb 8, 2016

Would it be possible to add a feature allowing the data from a single run to be downloaded in xls or csv format?

@domgetter domgetter self-assigned this Feb 8, 2016
@domgetter
Copy link
Owner

This is a good idea, and I'll go ahead and work on putting it in.

In the meantime, here's a workaround:

JSON.stringify(typerooni.core.history_json())

If you write that into your browser console after a game, it will spit out your history up until then as a JSON string (if you've taken quite a few tests, this string may be impractically long and very slow when it prints out to the console). It's the internal format of your history, and it's an array of histories, and in each histroy is an array of "words" that look like this:

{"times":[95,98,128,112],"word":"they ","correct":true,"backspace-used":false}

where 95 is the number of milliseconds between typing the "t" and the "h" in the word "they ". The 98 is the number of milliseconds between typing the "h" and the "e", and so on. If you typed the word correctly, then "correct" will be set to true, and if you used the backspace while typing that word, then "backspace-used" will be true.

Just don't forget that overall, it's an array of arrays of word objects!

@pkein
Copy link
Author

pkein commented Feb 9, 2016

This is great, thanks.

p

On Mon, Feb 8, 2016 at 6:40 PM, Dominic Muller [email protected]
wrote:

This is a good idea, and I'll go ahead and work on putting it in.

In the meantime, here's a workaround:

JSON.stringify(typerooni.core.history_json())

If you write that into your browser console after a game, it will spit out
your history up until then as a JSON string (if you've taken quite a few
tests, this string may be impractically long and very slow when it prints
out to the console). It's the internal format of your history, and it's an
array of histories, and in each histroy is an array of "words" that look
like this:

{"times":[95,98,128,112],"word":"they
","correct":true,"backspace-used":false}

where 95 is the number of milliseconds between typing the "t" and the "h"
in the word "they ". The 98 is the number of milliseconds between typing
the "h" and the "e", and so on. If you typed the word correctly, then
"correct" will be set to true, and if you used the backspace while typing
that word, then "backspace-used" will be true.

Just don't forget that overall, it's an array of arrays of word objects!


Reply to this email directly or view it on GitHub
#1 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants