This file contains hidden or 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
namespace :motiv do | |
# Import sleep data from Motiv ZMTVSLEEPEVENT Table | |
# To obtain this data in CSV format... | |
# First dump your Motiv DataModel from the iOS app using iExplorer | |
# Then open the sqlite file in DB Browser and export the table to CSV | |
task :import_sleepevents_for_user, [:filename, :email] => :environment do |task, args| | |
require 'csv' |