Mercurial > hg > Members > anatofuz > lectable
view cmd_donwload.go @ 9:2348344480da
...
author | anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 31 Mar 2020 15:43:14 +0900 |
parents | 8a7a15dc3b9d |
children | b6a2d89b06e7 |
line wrap: on
line source
package lectable import ( "context" "fmt" "io" "ie.u-ryukyu.ac.jp/hg/y19/index.cgi/home/hg/y19/k198584/Tools/lectable/syllabus" ) type cmdDownload struct{} func (cd *cmdDownload) name() string { return "download" } func (cd *cmdDownload) description() string { return "donwload html from lecture ids" } func (cd *cmdDownload) run(ctx context.Context, argv []string, outStream, errStream io.Writer) error { fmt.Println("download now!!") dh := syllabus.CreateGetSyllabus() _, err := dh.CheckAndMkdirBuilddir() if err != nil { return err } arr3 := []string{"601495001", "600625001"} lwps, err := dh.LecIDStoDonwlodSyllabus(ctx, arr3, outStream) return dh.DumpLectureWithPathJSON(lwps) }