-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Max Magorsch <arzano@gentoo.org>
- Loading branch information
Showing
9 changed files
with
116 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package feeds | ||
|
||
import ( | ||
"text/template" | ||
"net/http" | ||
"soko/pkg/logger" | ||
) | ||
|
||
// Show renders a template to show a given package | ||
func Changes(funcMap template.FuncMap, data interface{}, w http.ResponseWriter) { | ||
logger.Info.Println("Changes atom template") | ||
templates := template.Must( | ||
template.New("changes.atom"). | ||
Funcs(funcMap). | ||
ParseGlob("web/templates/feeds/changes.atom.tmpl")) | ||
|
||
//w.Header().Set("Content-Type", "application/atom+xml") | ||
templates.ExecuteTemplate(w, "changes.atom.tmpl", data) | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom"> | ||
<id>tag:packages.gentoo.org,2015-10-03:added:feed</id> | ||
<link rel="alternate" type="text/html" href="https://packages.gentoo.org"/> | ||
<link rel="self" type="application/atom+xml" href="https://packages.gentoo.org/packages/{{tolower .Name}}.atom"/> | ||
<title>Gentoo Packages: {{.Name}} packages</title> | ||
<updated>{{if ge (len .Versions) 1 }}{{if ge (len (index .Versions 0).Commits) 1 }}{{(index (index .Versions 0).Commits 0).CommitterDate}}{{else}}unknown{{end}}{{else}}unknown{{end}}</updated> | ||
<author> | ||
<name>Gentoo Packages Database</name> | ||
</author> | ||
{{range .Versions}} | ||
<entry> | ||
<id>tag:packages.gentoo.org,{{if ge (len .Commits) 1 }}{{(index .Commits 0).CommitterDate}}{{else}}unknown{{end}}:{{tolower $.Name}}:{{.Atom}}</id> | ||
<published>{{if ge (len .Commits) 1 }}{{(index .Commits 0).CommitterDate}}{{else}}unknown{{end}}</published> | ||
<link rel="alternate" type="text/html" href="https://packages.gentoo.org/packages/{{.Atom}}"/> | ||
<updated>{{if ge (len .Commits) 1 }}{{(index .Commits 0).CommitterDate}}{{else}}unknown{{end}}</updated> | ||
<title>{{.Atom}} ({{.Description}})</title> | ||
<content>{{.Atom}} is now available in Gentoo on these architectures: {{.Keywords}}</content> | ||
</entry> | ||
{{end}} | ||
</feed> | ||
|
||
|