Sleep as an Droid Export Parser

Sleep as an Droid is a lovely little sleep tracking app for android. Unfortunately its data export feature is a bit special and produces a fairly unusable CSV output where the headers change for each row. I wanted it in something a little more structured, so I wrote this.

Upload a the data export with the following form and you'll get JSON data back.. The schema for it is

[{ from : String,
   to : String, 
   comment : String,
   rating : Float,
   hours : Float,
   sleep-data : [{
     time : String,
     level : Float 
   }]
}]