Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ feeds:
- http://www.joelonsoftware.com/rss.xml
- https://www.youtube.com/feeds/videos.xml?channel_id=UCHnyfMqiRRG1u-2MsSQLbXA
google_news_keywords: George Hotz,ChatGPT,Copenhagen
google_news_length: 5
instapaper: true
weather_latitude: 37.77
weather_longitude: 122.41
Expand Down
9 changes: 8 additions & 1 deletion config.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ feeds:
- http://www.joelonsoftware.com/rss.xml
- https://www.youtube.com/feeds/videos.xml?channel_id=UCHnyfMqiRRG1u-2MsSQLbXA
google_news_keywords: George Hotz,ChatGPT,Copenhagen
google_news_length: 5
instapaper: true
weather_latitude: 37.77
weather_longitude: 122.41
Expand Down Expand Up @@ -151,7 +152,13 @@ func bootstrapConfig() {
googleNewsKeywords := url.QueryEscape(viper.Get("google_news_keywords").(string))
if googleNewsKeywords != "" {
googleNewsUrl := "https://news.google.com/rss/search?hl=en-US&gl=US&ceid=US%3Aen&oc=11&q=" + strings.Join(strings.Split(googleNewsKeywords, "%2C"), "%20%7C%20")
myFeeds = append(myFeeds, RSS{url: googleNewsUrl, limit: 15}) // #FIXME make it configurable
var googleNewsLength int
if viper.IsSet("google_news_length") {
googleNewsLength = viper.Get("google_news_length").(int)
} else {
googleNewsLength = 15 // default limit
}
myFeeds = append(myFeeds, RSS{url: googleNewsUrl, limit: googleNewsLength})
}
}

Expand Down