Last active
August 29, 2015 14:18
-
-
Save rbarazi/df35f1380ab4b399010b to your computer and use it in GitHub Desktop.
Import Weightbot CSV to Fitbit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1) Backup your wieghtbot data and then download it from: https://weightbot.com/ | |
# 2) Get a consumer_key and a consumer_secret from: https://dev.fitbit.com/apps/new | |
# 3) Use the key/secret from step 2 on https://dev.fitbit.com/apps/oauthtutorialpage to obtain a user_id/token/secret | |
# 4) install fitgem `gem install fitgem` | |
# 5) run the following from the console/irb | |
require 'fitgem' | |
c = Fitgem::Client.new( | |
:consumer_key => "", | |
:consumer_secret => "", | |
:token => "", | |
:secret => "", | |
:user_id => '', | |
:ssl => true | |
) | |
require 'csv' | |
csv = CSV.read("weightbot_data.csv") | |
csv = CSV.read("weightbot_data.csv", headers: true) | |
csv.each{|row| c.log_weight(row[" pounds"], row["date"])} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment