Skip to content

Commit

Permalink
Switch to MVHS
Browse files Browse the repository at this point in the history
  • Loading branch information
platipus25 committed Nov 5, 2019
1 parent 7aae032 commit c9977e1
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 12 deletions.
80 changes: 80 additions & 0 deletions MVHS2019-20.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
{
"custom": [

],
"mon":{
"start": {"hour":7, "minute": 15},
"end": {"hour": 15, "minute": 30},
"periods": [
{"name": "0", "start": {"hour": 7, "minute": 15}, "end": {"hour": 8, "minute": 5}},
{"name": "1", "start": {"hour": 8, "minute": 10}, "end": {"hour": 9, "minute": 0}},
{"name": "2", "start": {"hour": 9, "minute": 5}, "end": {"hour": 10, "minute": 0}},
{"name": "Brunch", "start": {"hour": 10, "minute": 0}, "end": {"hour": 10, "minute": 10}},
{"name": "3", "start": {"hour": 10, "minute": 15}, "end": {"hour": 11, "minute": 5}},
{"name": "4", "start": {"hour": 11, "minute": 10}, "end": {"hour": 12, "minute": 0}},
{"name": "Lunch", "start": {"hour": 12, "minute": 0}, "end": {"hour": 12, "minute": 45}},
{"name": "5", "start": {"hour": 12, "minute": 50}, "end": {"hour": 12, "minute": 45}},
{"name": "6", "start": {"hour": 13, "minute": 45}, "end": {"hour": 14, "minute": 35}},
{"name": "7", "start": {"hour": 14, "minute": 40} , "end": {"hour": 15, "minute": 30}}
]
},
"tue": {
"start": {"hour": 7, "minute": 55},
"end": {"hour": 15, "minute": 30},
"periods": [
{"name": "0", "start": {"hour": 7, "minute": 20}, "end": {"hour": 8, "minute": 5}},
{"name": "1", "start": {"hour": 8, "minute": 10}, "end": {"hour": 8, "minute": 55}},
{"name": "2", "start": {"hour": 9, "minute": 0}, "end": {"hour": 9, "minute": 50}},
{"name": "Brunch", "start": {"hour": 9, "minute": 50}, "end": {"hour": 10, "minute": 0}},
{"name": "3", "start": {"hour": 10, "minute": 5}, "end": {"hour": 10, "minute": 50}},
{"name": "Tutorial", "start": {"hour": 10, "minute": 50}, "end": {"hour": 11, "minute":25}},
{"name": "4", "start": {"hour": 11, "minute": 30}, "end": {"hour": 12, "minute": 15}},
{"name": "Lunch", "start": {"hour": 12, "minute": 15}, "end": {"hour": 13, "minute": 0}},
{"name": "5", "start": {"hour": 13, "minute": 5}, "end": {"hour": 13, "minute": 50}},
{"name": "6", "start": {"hour": 13, "minute": 55}, "end": {"hour": 14, "minute": 40}},
{"name": "7", "start": {"hour": 14, "minute": 45} , "end": {"hour": 15, "minute": 30}}
]
},
"wed": {
"start": {"hour": 7, "minute": 15},
"end": {"hour": 14, "minute": 35},
"periods": [
{"name": "0", "start": {"hour": 7, "minute": 15}, "end": {"hour": 8, "minute": 45}},
{"name": "2", "start": {"hour": 8, "minute": 50}, "end": {"hour": 10, "minute": 25}},
{"name": "Brunch", "start": {"hour": 10, "minute": 25}, "end": {"hour": 10, "minute": 40}},
{"name": "4", "start": {"hour": 11, "minute": 45}, "end": {"hour": 12, "minute": 45}},
{"name": "Lunch", "start": {"hour": 12, "minute": 15}, "end": {"hour": 13, "minute": 0}},
{"name": "6", "start": {"hour": 13, "minute": 5}, "end": {"hour": 14, "minute": 35}},
{"name": "Department Meeting", "start": {"hour": 14, "minute": 25}, "end": {"hour": 15, "minute": 30}}
]
},
"thu": {
"start": {"hour": 8, "minute": 10},
"end": {"hour": 3, "minute": 30},
"periods": [
{"name": "Staff Meeting", "start": {"hour": 7, "minute": 30}, "end": {"hour": 8, "minute": 5}},
{"name": "1", "start": {"hour": 8, "minute": 10}, "end": {"hour": 9, "minute": 45}},
{"name": "Brunch", "start": {"hour": 9, "minute": 45}, "end": {"hour": 10, "minute": 0}},
{"name": "3", "start": {"hour": 10, "minute": 5}, "end": {"hour": 11, "minute": 35}},
{"name": "Lunch", "start": {"hour": 11, "minute": 35}, "end": {"hour": 12, "minute": 20}},
{"name": "5", "start": {"hour": 12, "minute": 25}, "end": {"hour": 13, "minute": 55}},
{"name": "7", "start": {"hour": 14, "minute": 20} , "end": {"hour": 15, "minute": 30}}
]
},
"fri": {
"start": {"hour": 7, "minute": 15},
"end": {"hour": 15, "minute": 30},
"periods": [
{"name": "0", "start": {"hour": 7, "minute": 15}, "end": {"hour": 8, "minute": 5}},
{"name": "1", "start": {"hour": 8, "minute": 10}, "end": {"hour": 9, "minute": 0}},
{"name": "2", "start": {"hour": 9, "minute": 5}, "end": {"hour": 10, "minute": 0}},
{"name": "Brunch", "start": {"hour": 10, "minute": 0}, "end": {"hour": 10, "minute": 10}},
{"name": "3", "start": {"hour": 10, "minute": 15}, "end": {"hour": 11, "minute": 5}},
{"name": "4", "start": {"hour": 11, "minute": 10}, "end": {"hour": 12, "minute": 0}},
{"name": "Lunch", "start": {"hour": 12, "minute": 0}, "end": {"hour": 12, "minute": 45}},
{"name": "5", "start": {"hour": 12, "minute": 50}, "end": {"hour": 12, "minute": 45}},
{"name": "6", "start": {"hour": 13, "minute": 45}, "end": {"hour": 14, "minute": 35}},
{"name": "7", "start": {"hour": 14, "minute": 40} , "end": {"hour": 15, "minute": 30}}
]
}
}
14 changes: 5 additions & 9 deletions js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@
var { HOURS, MINUTES, SECONDS, DAYS, WEEKS, MONTHS } = whatsnext.countdown;

(async () => {
let schedule_base = await $.getJSON("https://raw.githubusercontent.com/platipus25/whatsnext/master/examples/config_files/schedule2018-19.json"); // /schedule2018-19.json
let schedule_base = await $.getJSON("MVHS2019-20.json"); // /schedule2018-19.json
window.schedule_base = {...schedule_base}

schedule_base = applyPersonalizedClasses(schedule_base)

/*
//let nextSchool = new whatsnext.WhatsnextStatic(schedule_base, new Date()).enumerateNextClass().start.toDate()
nextSchool = new Date(2018, 8, 5, 8, 30)
console.log(nextSchool)
window.inst = new whatsnext.WhatsnextSim(schedule_base, 0, nextSchool);//new Date(2019, 2, 8, 9, 30));
window.inst = new whatsnext.WhatsnextSim(schedule_base, 0, nextSchool);//new Date(2019, 2, 8, 9, 30));*/

//window.inst = new whatsnext.Whatsnext(schedule_base);
window.inst = new whatsnext.Whatsnext(schedule_base);
console.log(inst)
updateFrame()

Expand Down Expand Up @@ -191,9 +192,4 @@ var openOptions = () => {
}
}

$("#openOptions").on("click", openOptions)

var sim = (date = new Date(), multiplier = 0) => {
window.inst = new whatsnext.WhatsnextSim(schedule_base, multiplier, date)
updateFrame()
}
$("#openOptions").on("click", openOptions)
4 changes: 2 additions & 2 deletions js/options.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
window.periods = {
"0": {},
"1": {},
"2": {},
"3": {},
"4": {},
"5": {},
"6": {},
"7": {},
"8": {},
"7": {},
}


Expand Down
2 changes: 1 addition & 1 deletion options.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</head>
<body>
<h2>My Classes</h2>
<p>Note: This information is on <a href="https://ps.mvwsd.org/public/" target="_blank">PowerSchool</a>. <wbr/><a href="http://crittenden.mvwsd.org/bell-schedule.html" target="_blank">Crittenden Bell Schedule</a></p>
<p></p>
<form id="classes">
</form>

Expand Down

0 comments on commit c9977e1

Please sign in to comment.