Mercurial > hg > Members > anatofuz > lectable
changeset 1:1f47625c6948
...
author | anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 30 Mar 2020 20:49:17 +0900 |
parents | 5191dd198bf4 |
children | dccd0dd6cfbc |
files | lectable/getSyllabus.go |
diffstat | 1 files changed, 6 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/lectable/getSyllabus.go Mon Mar 30 20:40:42 2020 +0900 +++ b/lectable/getSyllabus.go Mon Mar 30 20:49:17 2020 +0900 @@ -30,7 +30,12 @@ teacher string } -func getSyllabus(lectureID, filePath string) (*lecture, error) { +var dayPeriodID = "ctl00_phContents_Detail_lbl_day_period\">" +var lectureNameID = "ctl00_phContents_Detail_lbl_lbl_lct_name_double\">" +var teacherNameID = "ctl00_phContents_Detail_lbl_syl_staff_name_double\">" +var endSpan = "</span>" + +func syllabus2LectureStruct(lectureID, filePath string) (*lecture, error) { file, err := os.Open(filePath) if err != nil { @@ -41,12 +46,6 @@ var lec lecture lec.id = lectureID - dayPeriodID := "ctl00_phContents_Detail_lbl_day_period\">" - lectureNameID := "ctl00_phContents_Detail_lbl_lbl_lct_name_double\">" - teacherNameID := "ctl00_phContents_Detail_lbl_syl_staff_name_double\">" - - endSpan := "</span>" - for scanner.Scan() { line := scanner.Text()