Skip to content

Commit f3bfea3

Browse files
committed
update flags for calendar parsing
1 parent 414a777 commit f3bfea3

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

main.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ func main() {
3838
scrapeProfiles := flag.Bool("profiles", false, "Alongside -scrape, signifies that professor profiles should be scraped.")
3939
// Flag for soc scraping
4040
scrapeOrganizations := flag.Bool("organizations", false, "Alongside -scrape, signifies that SOC organizations should be scraped.")
41-
// Flag for calendar scraping
42-
scrapeCalendar := flag.Bool("calendar", false, "Alongside -scrape, signifies that calendar should be scraped.")
41+
// Flag for calendar scraping and parsing
42+
calendar := flag.Bool("calendar", false, "Alongside -scrape or -parse, signifies that calendar should be scraped.")
4343
// Flag for astra scraping and parsing
4444
astra := flag.Bool("astra", false, "Alongside -scrape or -parse, signifies that Astra should be scraped/parsed.")
4545
// Flag for mazevo scraping and parsing
@@ -106,7 +106,7 @@ func main() {
106106
scrapers.ScrapeCoursebook(*term, *startPrefix, *outDir, *resume)
107107
case *scrapeOrganizations:
108108
scrapers.ScrapeOrganizations(*outDir)
109-
case *scrapeCalendar:
109+
case *calendar:
110110
scrapers.ScrapeCalendar(*outDir)
111111
case *astra:
112112
scrapers.ScrapeAstra(*outDir)
@@ -119,6 +119,8 @@ func main() {
119119
}
120120
case *parse:
121121
switch {
122+
case *calendar:
123+
parser.ParseCalendar(*inDir, *outDir)
122124
case *astra:
123125
parser.ParseAstra(*inDir, *outDir)
124126
case *mazevo:

parser/calendarParser.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,13 @@ import (
88
"regexp"
99
"slices"
1010
"strings"
11-
"slices"
12-
"regexp"
1311

1412
"github.com/UTDNebula/api-tools/utils"
1513
"github.com/UTDNebula/nebula-api/api/schema"
1614
)
1715

18-
<<<<<<< HEAD
19-
=======
2016
// Some events have only the building name, not the abbreviation
2117
// Maps building names to their abbreviations
22-
>>>>>>> 0af6300 (Add calendar parser)
2318
var buildingAbbreviations = map[string]string{
2419
"Activity Center": "AB",
2520
"Activity Center Bookstore": "ACB",

0 commit comments

Comments
 (0)