comparison cmd_donwload.go @ 5:a0d23f38344d

...
author anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Tue, 31 Mar 2020 13:40:06 +0900
parents 8bc574052fcb
children fca852bfd500
comparison
equal deleted inserted replaced
4:8bc574052fcb 5:a0d23f38344d
2 2
3 import ( 3 import (
4 "context" 4 "context"
5 "fmt" 5 "fmt"
6 "io" 6 "io"
7
8 "ie.u-ryukyu.ac.jp/hg/y19/index.cgi/home/hg/y19/k198584/Tools/lectable/syllabus"
7 ) 9 )
8 10
9 type cmdDownload struct{} 11 type cmdDownload struct{}
10 12
11 func (cd *cmdDownload) name() string { 13 func (cd *cmdDownload) name() string {
16 return "donwload html from lecture ids" 18 return "donwload html from lecture ids"
17 } 19 }
18 20
19 func (cd *cmdDownload) run(ctx context.Context, argv []string, outStream, errStream io.Writer) error { 21 func (cd *cmdDownload) run(ctx context.Context, argv []string, outStream, errStream io.Writer) error {
20 fmt.Println("download now!!") 22 fmt.Println("download now!!")
21 return nil 23 dh := syllabus.CreateGetSyllabus()
24 _, err := dh.CheckAndMkdirBuilddir()
25 if err != nil {
26 return err
27 }
28 arr3 := []string{"601495001", "600625001"}
29
30 err = dh.LecIDStoDonwlodSyllabus(ctx, arr3)
31 return err
22 } 32 }