mozilla / hive-chicago-buzz

http://schedule.hivechicagobuzz.org
Mozilla Public License 2.0
1 stars 5 forks source link

Turn Google Spreadsheet exported data into the correct format #9

Closed mmmavis closed 8 years ago

mmmavis commented 8 years ago

For the MozFest app, the Python Loader script does not only fetch data from the Google Spreadsheet but also consolidate and format the data in the way that the app consumes.

Since we are skipping the loader script for the Hive Chicago Buzz app, we need to make sure the each session entry in the json blob have the 2 properties facilitator_array and facilitators

"facilitator_array": [
    "Erika Drushka",
    "Mavis Ou, @ohmmmavis, Mozilla Foundation",
    "Scott Downe, Mozilla Foundation"
], 
"facilitators": "Erika Drushka, Mavis Ou, Scott Downe" 

We can probably do that in this code block since we are already iterating through the sessions list there. This might not be optimal but it's the quickest way to get the facilitators data display correctly without making too much change to schedule.js

/cc @ScottDowne

mmmavis commented 8 years ago

@ScottDowne Actually, this doesn't only apply to the facilitator properties. If you want to minimize the changes you make to schedule.js make sure the json blob is in this MozFest Session format before you feed the data into the app.

ScottDowne commented 8 years ago

Hm, not sure I'm following.

Could we just manually fill facilitators and facilitator_array data in session.json?

mmmavis commented 8 years ago

Either way works. It's just if we decide to manually format every entry in sessions.json it will be lots of tedious and repetitive work.

edrushka commented 8 years ago

There are 39 individual sessions. I can do it manually if need be, Scott.

ScottDowne commented 8 years ago

We could also each do half :D

mmmavis commented 8 years ago

@edrushka @ScottDowne

I just submitted a PR to demonstrate what I meant by "formatting the json blob in MozFest Session format". Hopefully this can help take some of your confusion away @ScottDowne :stuck_out_tongue: Also feel free to not merge it (it works locally on my machine but it's currently failing Travis test which I'm not sure why lol)