Compare commits
3 Commits
a61be775d5
...
94065c21ad
Author | SHA1 | Date |
---|---|---|
Chris Sexton | 94065c21ad | |
Chris Sexton | b00bef7da4 | |
Chris Sexton | 20595a7d7f |
|
@ -205,3 +205,5 @@ example
|
|||
*.adoc
|
||||
tpsemester
|
||||
semestergen
|
||||
main-packr.go
|
||||
packrd
|
||||
|
|
9
Makefile
9
Makefile
|
@ -1,5 +1,10 @@
|
|||
build: gendates.go
|
||||
packr2 build
|
||||
|
||||
run: build *.adoc.tpl c311.toml
|
||||
./semestergen c311.toml
|
||||
|
||||
build: gendates.go
|
||||
go build
|
||||
clean:
|
||||
@rm -rf packrd main-packr.go semestergen
|
||||
|
||||
.PHONY: clean
|
||||
|
|
|
@ -24,8 +24,6 @@ var tplMap = map[string]string{
|
|||
"course": "course.task.tpl",
|
||||
}
|
||||
|
||||
var linkChecker = mkLinkChecker()
|
||||
|
||||
type DayMap map[int]time.Time
|
||||
|
||||
type Eval struct {
|
||||
|
@ -221,7 +219,7 @@ func writeSyllabus(c Config) error {
|
|||
return err
|
||||
}
|
||||
|
||||
func mkLinkChecker() func(Link) Link {
|
||||
var linkChecker = func() func(Link) Link {
|
||||
ids := map[string]bool{}
|
||||
return func(l Link) Link {
|
||||
if !ids[l.Title] {
|
||||
|
@ -243,7 +241,7 @@ func mkLinkChecker() func(Link) Link {
|
|||
|
||||
return l
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
func mkConfig(path string) Config {
|
||||
var c Config
|
||||
|
|
Loading…
Reference in New Issue