Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.idea/
courses.ics
courses.ics
*.exe
6 changes: 3 additions & 3 deletions generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ func New(username, password string, webVPN bool) (Generator, error) {
var platform neugo.Platform
if webVPN {
platform = neugo.WebVPN
s.currentWeekUrl = neugo.EncryptToWebVPN(defaultCurrentWeekUrl)
s.courseTableUrl = neugo.EncryptToWebVPN(defaultCourseTableUrl)
s.courseTableActionUrl = neugo.EncryptToWebVPN(defaultCourseTableActionUrl)
s.currentWeekUrl = neugo.EncryptURLToWebVPN(defaultCurrentWeekUrl)
s.courseTableUrl = neugo.EncryptURLToWebVPN(defaultCourseTableUrl)
s.courseTableActionUrl = neugo.EncryptURLToWebVPN(defaultCourseTableActionUrl)
} else {
platform = neugo.CAS
s.currentWeekUrl = defaultCurrentWeekUrl
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ module github.com/neucn/elise
go 1.23.0

require (
github.com/google/uuid v1.1.2
github.com/neucn/neugo v0.3.0
github.com/google/uuid v1.6.0
github.com/neucn/neugo v0.4.1
)
6 changes: 6 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y=
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/neucn/neugo v0.2.0 h1:aOzLQWJ9FZmTpciKedaHIuA3w05IjJ3yPpemWTFKYCM=
github.com/neucn/neugo v0.2.0/go.mod h1:sKga4X9FF5N5ApwXxv+7RyqXZPDiBztj27PJX5r4wa8=
github.com/neucn/neugo v0.2.1 h1:nIh+LYEyqyOeiFZnvbNMbfFB0+h4wCUlfqQAgSu9Uoc=
github.com/neucn/neugo v0.2.1/go.mod h1:sKga4X9FF5N5ApwXxv+7RyqXZPDiBztj27PJX5r4wa8=
github.com/neucn/neugo v0.3.0 h1:JwNAYgXA3GxJ01iGggps+yqJPqyAOp91PjnO/fQLRMg=
github.com/neucn/neugo v0.3.0/go.mod h1:sKga4X9FF5N5ApwXxv+7RyqXZPDiBztj27PJX5r4wa8=
github.com/neucn/neugo v0.4.0 h1:2zsVBIaJvMNf/nPH/0SINP18E+wobFZ3MhvfCbZuXkU=
github.com/neucn/neugo v0.4.0/go.mod h1:58gIwIAZVecSpRPcDgEsMR3uwu77V7ryywDnv/OgYDI=
github.com/neucn/neugo v0.4.1 h1:Hj8V7KanJ/s4N4lLbmQE4g5pQTK4A6Mn6ruKeboSGUI=
github.com/neucn/neugo v0.4.1/go.mod h1:58gIwIAZVecSpRPcDgEsMR3uwu77V7ryywDnv/OgYDI=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
Expand Down
2 changes: 1 addition & 1 deletion ics/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ END:VTIMEZONE` + "\n"
for i := 0; i < len(periods); i++ {
var eventData string
eventData = `BEGIN:VEVENT` + "\n"
startDate := startDay.AddDate(0, 0, (startWeek[i]-1)*7+weekDay+1)
startDate := startDay.AddDate(0, 0, (startWeek[i]-1)*7+(weekDay+1)%7)

if strings.Contains(course.RoomName, "浑南") {
eventData = eventData + `DTSTART;TZID=Asia/Shanghai:` + startDate.Format("20060102T") + ClassStartTimeHunnan[st] + "\n"
Expand Down