From 567a64aa25a1823f6188c8e17edfca4caf6499b0 Mon Sep 17 00:00:00 2001 From: KatolaZ Date: Wed, 10 Jan 2018 23:47:19 +0000 Subject: added Suite, Section, Component, Priority --- d1pkgweb.go | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'd1pkgweb.go') diff --git a/d1pkgweb.go b/d1pkgweb.go index 60c761f..d9f236f 100644 --- a/d1pkgweb.go +++ b/d1pkgweb.go @@ -5,6 +5,7 @@ import ( "d1pkgweb/deb822" "fmt" "os" + "strings" ) var templ = ` @@ -21,7 +22,13 @@ div.pkgname{ font-size: 150%; margin-top: 40px; margin-left: 40px; - border-bottom: 2px solid #444444; +} + +div.pkg_suite{ + font-size: 110%; + margin-top: 15px; + margin-left: 40px; + margin-bottom: 60px; } div.description{ @@ -60,7 +67,8 @@ li.rec_item{ -
{{.Name}} {{.Version}}
+
{{.Name}} {{.Version}} [{{.Section}} - {{.Priority}}]
+
[{{.Suite}} - {{.Component}}]
{{.Description}}
@@ -102,6 +110,9 @@ func main() { fnames := args[1:] for _, fname := range fnames { + nameComps := strings.Split(fname, "_") + suite := nameComps[3] + component := nameComps[4] f, err := os.Open(fname) if err != nil { defer f.Close() @@ -115,7 +126,7 @@ func main() { if r != nil { for s, err := deb822.ScanStanza(r); s["Package"] != ""; s, err = deb822.ScanStanza(r) { if err == nil { - deb822.Stanza2HtmlPage(s, templ, ".") + deb822.Stanza2HtmlPage(s, templ, ".", suite, component) } else { fmt.Printf("error: %s\n", err) } -- cgit v1.2.3