magsol / garmin

Some scripts I've thrown together to analyze my Garmin data.
MIT License
70 stars 34 forks source link

Support for wellness data #16

Closed aquatix closed 7 years ago

aquatix commented 7 years ago

Hi there, and thanks so much for creating this scraper.

I was interested in my wellness data (steps, stairs taken and such), so I implemented that too, downloading as json. You can provide a range of dates, and Garmin Connect will aggregate it in one json file.

Also, fixed a minor issue with the login :)

magsol commented 7 years ago

Let me know once you've finished making changes with this PR and I can merge.

aquatix commented 7 years ago

Yeah, I kind of took your code and made a run with it :) I'm done with the Wellness data for now, started on a visualisation script to generate some graphs (basically some pretty http://www.chartjs.org/ graphs for step count and activity type and I'd like to do some others too), but didn't commit that yet, as it would mess up the pull request (should have created a branch for the PR, but whatever).

Thanks for the kind words on my coding style. I also noticed that you had a rewrite with requests instead of mechanize; I would like to merge that in my version and do some refactoring to make the download part a bit more clear, as deciding what to download is now kind of a hack.

Not sure on making it hot-swappable and such, might be overkill, but making some modules or more clear functions will certainly help readability and maintainability.

And yes, the login fix was just the slight change to the regex; they changed the quotes.

magsol commented 7 years ago

Ok, I'll go ahead and merge the PR. Definitely open up new PRs on branches with your viz contribs!

I think I named that branch before actually undertaking any work; there's a package "mechanicalsoup" that basically picks up where mechanize left off, including Python 3 support https://github.com/hickford/MechanicalSoup . That's what I was working to try and refactor in as a mechanize replacement. It's not quite as straightforward as a drop-in replacement--the API calls are different--but it's close. Once that refactor is complete, that'll be merged into master, since it's my firm belief that Python 3 is the future, and the future is now :)

On Tue, Aug 15, 2017 at 10:25 AM Michiel Scholten notifications@github.com wrote:

Yeah, I kind of took your code and made a run with it :) I'm done with the Wellness data for now, started on a visualisation script to generate some graphs (basically some pretty http://www.chartjs.org/ graphs for step count and activity type and I'd like to do some others too), but didn't commit that yet, as it would mess up the pull request (should have created a branch for the PR, but whatever).

Thanks for the kind words on my coding style. I also noticed that you had a rewrite with requests instead of mechanize; I would like to merge that in my version and do some refactoring to make the download part a bit more clear, as deciding what to download is now kind of a hack.

Not sure on making it hot-swappable and such, might be overkill, but making some modules or more clear functions will certainly help readability and maintainability.

And yes, the login fix was just the slight change to the regex; they changed the quotes.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/magsol/garmin/pull/16#issuecomment-322482446, or mute the thread https://github.com/notifications/unsubscribe-auth/AAIQ-TyKyLyOXx9ihwP7DKnl3h14sbHxks5sYapdgaJpZM4Otr4w .

-- iPhone'd