 
     cb days
 
-importer = new Import50Hertz
-importer.fetch "2014-07-01", "wind", "actual", (days) -> console.log days
+importer = new ImportTennet
+importer.fetch "2014-07", (days) -> console.log days
+#importer.fetch "2014-07-01", "wind", "actual", (days) -> console.log days


class Import


ImportTennet =
  fetch: (month, cb) ->
    request "http://www.tennettso.de/site/Transparenz/veroeffentlichungen/netzkennzahlen/tatsaechliche-und-prognostizierte-windenergieeinspeisung/tatsaechliche-und-prognostizierte-windenergieeinspeisung/monthDataSheetCsv?monat=#{month}",
      (error, response, body) ->
        csv.parse body,
          delimiter: ";",
          (err, data) ->
            ImportTennet.parse data, cb

  parse: (data, cb) ->
    current = today = false


        day[row[1]-1] =
          time: time
          actual: Number row[2]
          forecast: Number row[3]

    cb days

