Skip to content

Commit 3b2b659

Browse files
committed
Include additional metadata in repository like author and abstract
1 parent a0962f1 commit 3b2b659

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

files.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -602,6 +602,22 @@ func readXourseHtmlMetadata(htmlFilename string) (map[string]string, error) {
602602
}
603603
})
604604

605+
doc.Find("meta[name=\"author\"]").Each(func(i int, s *goquery.Selection) {
606+
content, exists := s.Attr("content")
607+
if exists {
608+
if len(content) > 0 {
609+
results["author"] = content
610+
}
611+
}
612+
})
613+
614+
abstract, err := doc.Find("div.abstract").Html()
615+
if err == nil {
616+
if len(abstract) > 0 {
617+
results["abstract"] = abstract
618+
}
619+
}
620+
605621
// BADBAD: should also grab a priority, etc.
606622

607623
return results, nil

0 commit comments

Comments
 (0)