Comments (5)
I think CSV should work fine, easily parsable by toipe
and is also available to the user for viewing (outside of the program).
from toipe.
I'd be willing to take a crack at this. I just want to know if serialization is something that is open for discussion, or if manual parsing of the values into CSV is preferred.
- Use Serde and then something like a csv parser that can be used with Serde
- Make another function under display_results named
save_csv
and then do the manual conversion in that function.
I'm leaning towards using Serde just because it opens up future expansion for graphing etc. without much, if any, rewriting as most libraries support Serde pretty well. Only issue I know Serde will have is that the started_at
and ended_at
fields in ToipeResults
will have to go because Serde can't serialize std::time::Instant
without more external libraries or our own serialization/deserialization implementation. Could just be moved into a single duration: std::time::Duration
field and then calculate the Duration
before creating the struct.
I'm interested in any thoughts regarding this.
from toipe.
Hi,
What results specifically would you like to store?
The most obvious and easily available metrics are the accuracy and wpm as they're already part of the ToipeResults
structure
from toipe.
@abaksy perhaps it would be good to store the whole of ToipeResults
. Any required metric can then be derived from that.
from toipe.
@treatybreaker thank you for taking a crack at this. I prefer the serde solution. I'm assuming that each ToipeResults
will be serialized individually and appended to the CSV.
Could just be moved into a single
duration: std::time::Duration
field and then calculate theDuration
before creating the struct.
This is reasonable. Although, along with the duration I would also like to store the start timestamp of the test. Perhaps chrono::DateTime
.
from toipe.
Related Issues (20)
- not working with cusotm words list HOT 1
- Binary size - compress word lists? HOT 3
- Add shortcut to delete previous words and show statistics of previous typing tests HOT 1
- Problem with custom word list HOT 3
- Add support for phrases and code HOT 1
- Setup cache in CI
- 0.0 wpm HOT 1
- Extra space at the end of certain tests
- Words starting with z are most likely ignored HOT 2
- [enhancement] Resetting the cursor HOT 2
- Use charmbracelet/vhs to auto-generate demo image
- Handle terminal resize gracefully
- ctrl+h to backspace HOT 2
- C-w can't delete space
- Add support for custom books HOT 4
- Build failed from Cargo HOT 2
- I'm missing OS wordlist from install HOT 3
- Add support for punctuation HOT 1
- Add support for long words HOT 1
- Fix release workflow and add MacOS ARM binaries
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from toipe.