File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,11 @@ import (
1111 "github.com/UTDNebula/nebula-api/api/schema"
1212)
1313
14+ var buildingRenames = map [string ]string {
15+ "Student Union" : "SU" ,
16+ "Student Services Addition (SSA)" : "SSA" ,
17+ }
18+
1419type SourceData struct {
1520 Bookings []map [string ]interface {} `json:"bookings"`
1621}
@@ -54,6 +59,14 @@ func ParseMazevo(inDir string, outDir string) {
5459 continue
5560 }
5661 * building = strings .TrimSpace (* building )
62+ for key , value := range buildingRenames {
63+ if * building == key {
64+ * building = value
65+ }
66+ if strings .HasPrefix (* room , value + " " ) {
67+ * room = strings .TrimPrefix (* room , value + " " )
68+ }
69+ }
5770
5871 if _ , exists := multiBuildingMap [date ]; ! exists {
5972 multiBuildingMap [date ] = make (map [string ]map [string ][]schema.MazevoEvent )
You can’t perform that action at this time.
0 commit comments