all repos — honk @ c89d4c002fdd483fd82ea8dd63988f48d0d958e3

my fork of honk

add time and place to rss feeds
Ted Unangst tedu@tedunangst.com
Thu, 03 Oct 2019 15:49:36 -0400
commit

c89d4c002fdd483fd82ea8dd63988f48d0d958e3

parent

71ca9d93877085777250a670c61d9e70a07b6c5f

1 files changed, 10 insertions(+), 0 deletions(-)

jump to
M web.goweb.go

@@ -175,6 +175,16 @@ for _, d := range honk.Donks {

desc += fmt.Sprintf(`<p><a href="%s">Attachment: %s</a>`, d.URL, html.EscapeString(d.Name)) } + if t := honk.Time; t != nil { + desc += fmt.Sprintf(`<p>Time: %s`, t.StartTime.Local().Format("03:04PM EDT Mon Jan 02")) + if t.Duration != 0 { + desc += fmt.Sprintf(`<br>Duration: %s`, t.Duration) + } + } + if p := honk.Place; p != nil { + desc += fmt.Sprintf(`<p>Location: <a href="%s">%s</a> %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),