Skip to content

Instantly share code, notes, and snippets.

View deadroxy's full-sized avatar

Johanna Brewer deadroxy

View GitHub Profile
@deadroxy
deadroxy / motivimport.rake
Last active May 29, 2019 10:49
rake task to import motiv sleepevent data
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'