SaddlebackComputerScience / class-list-extractor

Script to extract class lists from saddleback.edu/cs
MIT License
0 stars 1 forks source link

Create HTML Table of days/times #1

Closed dragon0 closed 6 years ago

dragon0 commented 6 years ago

We need a function to convert the days and times into an HTML table that can be used for the schedule.

The day object currently looks like:

"lab": {
    "day": "M W",
    "room": "SM 346",
    "time": "12:30PM - 1:20"
},
"lecture": {
    "day": "M W",
    "room": "SM 301",
    "time": "11:00AM - 12:15"
}

This needs to become a table like:

      |    MON     |    TUE     |    WED     |    THU     |    FRI     |
      | 11 |12 | 1 | 11 |12 | 1 | 11 |12 | 1 | 11 |12 | 1 | 11 |12 | 1 |
SM301 | X|X|X| | | |  | | | | | | X|X|X| | | |  | | | | | |  | | | | | |
SM346 |  | | |X|X| |  | | | | | |  | | |X|X| |  | | | | | |  | | | | | |

Where X represents filled-in cells.