Open flowstatedev opened 1 month ago
Also, I think if the intent is to create something that's easily machine-readable, JSON would be a good choice (inb4 the device library is already JSON haha.)
While I agree that there could be different or even better formats, CSV even though originally meant comma separated list, is nowdays used in a broader context. In most decent csv readers (code or app or program) you'll be able to set the separator. Here's how to set it in Numbers: https://apple.stackexchange.com/questions/268051/open-csv-file-with-different-delimiter
I agree that it's not hard to set the separator(s). I appreciate the link, but that wasn't really my point. I was thinking about the default, out-of-the box user experience.
My points still stand:
The reason I mentioned a different file format is precisely bc CSV isn't really standardized (which is why all of this stuff is up for debate.)
Anyway, it was just a thought. I just figured it would be nice to have an optimal UX out-of-the-box on github and in popular apps like Excel and Numbers. (e.g. Ideally: if the files are viewed in github, github pretty-prints them and makes them searchable. if someone downloads a CSV file and double-clicks it, the file is rendered in a nice way without changing any settings. If I use a VS Code extension like Rainbow CSV, it understands how to display these files.)
Thanks again for the scripts and CSV files!
First off, thank you very much for doing this! This is a great resource for CIQ devs (all 5 of us).
My nitpicky issue is that the device info csv files are not csv files:
e.g. https://github.com/flocsy/garmin-dev-tools/blob/main/csv/device2all-versions.csv
If this file is opened in Numbers, a table which looks like the following is created (where the first row is incorrectly rendered as a header):
...
I realize this scheme is partly a consequence of the fact that each record has a variable number of fields. With this in mind, I would invert the current scheme: use a comma to separate the record key (in this case, device id) from the other fields, and use a non-standard separator (such as
|
or:
) to separate the variable-arity fields (in this case, the version numbers.) Or you could stick with a commas, but escape them using quotes.e.g.
This should result in a nice table which looks like:
...
If you're on board with this, I'd be happy to a push a PR to implement whichever approach you think is best.