From 26e9a9a23269d95b06c2b65f36523af9022dd635 Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Thu, 3 Oct 2019 15:49:36 -0400 Subject: [PATCH] add time and place to rss feeds --- web.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/web.go b/web.go index 9df5666..cdec323 100644 --- a/web.go +++ b/web.go @@ -175,6 +175,16 @@ func showrss(w http.ResponseWriter, r *http.Request) { desc += fmt.Sprintf(`

Attachment: %s`, d.URL, html.EscapeString(d.Name)) } + if t := honk.Time; t != nil { + desc += fmt.Sprintf(`

Time: %s`, t.StartTime.Local().Format("03:04PM EDT Mon Jan 02")) + if t.Duration != 0 { + desc += fmt.Sprintf(`
Duration: %s`, t.Duration) + } + } + if p := honk.Place; p != nil { + desc += fmt.Sprintf(`

Location: %s %f %f`, + html.EscapeString(p.Url), html.EscapeString(p.Name), p.Latitude, p.Longitude) + } feed.Items = append(feed.Items, &rss.Item{ Title: fmt.Sprintf("%s %s %s", honk.Username, honk.What, honk.XID),