Skip to content

Instantly share code, notes, and snippets.

@rbarazi
Last active August 29, 2015 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rbarazi/df35f1380ab4b399010b to your computer and use it in GitHub Desktop.
Save rbarazi/df35f1380ab4b399010b to your computer and use it in GitHub Desktop.
Import Weightbot CSV to Fitbit
# 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