small pixel drawing of a pufferfish vore

memory hack: remove Image/Summary/Categories
Jes Olson j3s@c3f.net
Thu, 01 Aug 2024 07:52:12 -0400
commit

32969b8932d4244e76fcefe6b54e0ed626d8696b

parent

a4f603e1b9dfe9c897e538c868b06af6e5041507

4 files changed, 0 insertions(+), 16 deletions(-)

jump to
M rss/atom.gorss/atom.go

@@ -27,7 +27,6 @@ out.Link = link.Href

break } } - out.Image = feed.Image.Image() out.Refresh = time.Now().Add(DefaultRefreshInterval) out.Items = make([]*Item, 0, len(feed.Items))

@@ -43,7 +42,6 @@ }

next := new(Item) next.Title = item.Title - next.Summary = item.Summary if item.Published != "" { next.Date, err = parseTime(item.Published) if err == nil {
M rss/rss.gorss/rss.go

@@ -92,7 +92,6 @@ Author string `json:"author"`

Description string `json:"description"` Link string `json:"link"` // Link to the creator's website. UpdateURL string `json:"updateurl"` // URL of the feed itself. - Image *Image `json:"image"` // Feed icon. Categories []string `json:"categories"` Items []*Item `json:"items"` ItemMap map[string]struct{} `json:"itemmap"` // Used in checking whether an item has been seen before.

@@ -195,7 +194,6 @@ fmt.Fprintf(w, "\xff\t\xffTitle:\t%q\n", f.Title)

fmt.Fprintf(w, "\xff\t\xffDescription:\t%q\n", f.Description) fmt.Fprintf(w, "\xff\t\xffLink:\t%q\n", f.Link) fmt.Fprintf(w, "\xff\t\xffUpdateURL:\t%q\n", f.UpdateURL) - fmt.Fprintf(w, "\xff\t\xffImage:\t%q (%s)\n", f.Image.Title, f.Image.URL) fmt.Fprintf(w, "\xff\t\xffRefresh:\t%s\n", f.Refresh.Format(DATE)) fmt.Fprintf(w, "\xff\t\xffUnread:\t%d\n", f.Unread) fmt.Fprintf(w, "\xff\t\xffItems:\t(%d) {\n", len(f.Items))

@@ -209,7 +207,6 @@ w := buf

fmt.Fprintf(w, "Feed %q\n", f.Title) fmt.Fprintf(w, "\t%q\n", f.Description) fmt.Fprintf(w, "\t%q\n", f.Link) - fmt.Fprintf(w, "\t%s\n", f.Image) fmt.Fprintf(w, "\tRefresh at %s\n", f.Refresh.Format(DATE)) fmt.Fprintf(w, "\tUnread: %d\n", f.Unread) fmt.Fprintf(w, "\tItems:\n")

@@ -223,11 +220,8 @@

// Item represents a single story. type Item struct { Title string `json:"title"` - Summary string `json:"summary"` - Categories []string `json:"category"` Link string `json:"link"` Date time.Time `json:"date"` - Image *Image `json:"image"` DateValid bool ID string `json:"id"` Enclosures []*Enclosure `json:"enclosures"`

@@ -247,8 +241,6 @@ if debug {

w := tabwriter.NewWriter(buf, 0, 8, 0, '\t', tabwriter.StripEscape) fmt.Fprintf(w, "\xff%s\xffItem {\n", single) fmt.Fprintf(w, "\xff%s\xffTitle:\t%q\n", double, i.Title) - fmt.Fprintf(w, "\xff%s\xffSummary:\t%q\n", double, i.Summary) - fmt.Fprintf(w, "\xff%s\xffCategories:\t%q\n", double, i.Categories) fmt.Fprintf(w, "\xff%s\xffLink:\t%s\n", double, i.Link) fmt.Fprintf(w, "\xff%s\xffDate:\t%s\n", double, i.Date.Format(DATE)) fmt.Fprintf(w, "\xff%s\xffID:\t%s\n", double, i.ID)
M rss/rss_1.0.gorss/rss_1.0.go

@@ -29,7 +29,6 @@ out := new(Feed)

out.Title = channel.Title out.Description = channel.Description out.Link = channel.Link - out.Image = channel.Image.Image() if channel.MinsToLive != 0 { sort.Ints(channel.SkipHours) next := time.Now().Add(time.Duration(channel.MinsToLive) * time.Minute)

@@ -82,7 +81,6 @@ }

next := new(Item) next.Title = item.Title - next.Summary = item.Description next.Link = item.Link if item.Date != "" { next.Date, err = parseTime(item.Date)
M rss/rss_2.0.gorss/rss_2.0.go

@@ -37,7 +37,6 @@ out.Link = link.Chardata

break } } - out.Image = channel.Image.Image() if channel.MinsToLive != 0 { sort.Ints(channel.SkipHours) next := time.Now().Add(time.Duration(channel.MinsToLive) * time.Minute)

@@ -90,10 +89,7 @@ }

next := new(Item) next.Title = item.Title - next.Summary = item.Description - next.Categories = item.Categories next.Link = item.Link - next.Image = item.Image.Image() if item.Date != "" { next.Date, err = parseTime(item.Date) if err == nil {