-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
Description
function phenClockGDImport (json ) {
var out = [];
for( var i = 0; i < json.feed.entry.length; i++){
var entry = json.feed.entry[i];
out[i] = {
'id': entry.gsx$id.$t,
'categories': entry.gsx$category.$t.split(','),
'category': entry.gsx$category.$t,
'name': entry.gsx$name.$t,
'events': [{
'start': entry.gsx$eventstart.$t,
'end': entry.gsx$eventend.$t
}],
'description': entry.gsx$description.$t,
'color': entry.gsx$color.$t.replace('#','')
}
}
pClock.data = out;
}
This is the logic that builds the pClock data object. At some point this data needs to be validated.
id must be a number
category & categories... these need to be fleshed out more, might deprecate.
name there are actually two kinds of names, the species name (which should be the same across spreadsheets) and common name, which is what local people call it.
events should be a date, in any conceivable format.
description can be any kind of text
color is a hex color with or without a hashtag
Reactions are currently unavailable