Add ability to import from openScale backup #18
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Just stumbled upon trale, love the design!
I use openScale to pull measurements from a bluetooth scale, and I'd love to be able to take that data into trale.
openScale offers
.csv
backups (although this is somewhat hidden, the.csv
files are only created using the "auto backup" feature, not the manual backup). I've attached anexample for reference.
This PR adds support for this format to trale, differentiating the formats by their respective extensions (
txt
andcsv
). The openScale format parsing is naive, it doesnt reference the included headers but just targets the specific fields, so if this format changes, the logic here will likely break.If there's interest, I can implement proper
csv
parsing logic, for now this approach works well for the latest openScale version.Would love to see this get merged so I don't need to maintain my fork to use upstream updates! Let me know if any changes are needed or there are problems with this.