working on subdirs by feed

This commit is contained in:
bel
2019-09-02 09:08:53 -06:00
parent 3281104f2e
commit 8a5a5d0cf4
9 changed files with 101 additions and 16 deletions

View File

@@ -16,20 +16,22 @@ import (
const nsItems = "nsItems"
type Item struct {
Title string
Link string
Content string
TS time.Time
Title string
Link string
Content string
TS time.Time
Copyright string
}
type Items []*Item
func newItem(i *gofeed.Item, contentFilter string) (*Item, error) {
func newItem(i *gofeed.Item, contentFilter, copyright string) (*Item, error) {
item := &Item{
Title: i.Title,
Link: i.Link,
Content: i.Content,
TS: latestTSPtr(i.UpdatedParsed, i.PublishedParsed),
Title: i.Title,
Link: i.Link,
Content: i.Content,
TS: latestTSPtr(i.UpdatedParsed, i.PublishedParsed),
Copyright: copyright,
}
if item.Content == "" {