[PR #129] [MERGED] Feature: Add includesourcetitle filter #148

Closed
opened 2026-09-29 12:59:52 +00:00 by slurdge · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/slurdge/goeland/pull/129
Author: @panigrc
Created: 3/25/2023
Status: ✅ Merged
Merged: 3/26/2023
Merged by: @slurdge

Base: master ← Head: feature/add-includesourcetitle-filter


📝 Commits (7)

  • 1b6106b feat: Add fields to the Entry struct
  • 92d1f83 feat: Set the source in the entry when fetching
  • 6ba56f5 feat: Add includesourcetitle filter
  • 0c5a5af doc: Add includesourcetitle filter
  • caa3701 refactor: Use a pointer to the Source in the Entry
  • 15ce0f7 refactor: Point to the previous Source
  • 902b28f refactor: Remove the
    in the Source titles

📊 Changes

4 files changed (+27 additions, -9 deletions)

View changed files

📝 README.md (+1 -0)
📝 internal/goeland/fetch/feed.go (+5 -2)
📝 internal/goeland/filters/filter.go (+12 -0)
📝 internal/goeland/source.go (+9 -7)

📄 Description

This PR adds a new filter which, when enabled it will display the source title above of each group of merged entries.
This will make it easier to know from which source the entry is coming from.

Example:

[sources]

[sources.slurdge]
type = "feed"
url = "https://nitter.smnz.de/slurdge/rss"
filters = ["first(1)", "includelink", "includesourcetitle"]

[sources.hackernews]
type = "feed"
url = "https://hnrss.org/newest"
filters = ["first(1)", "includelink", "includesourcetitle"]

[sources.codinghumor]
type = "feed"
url = "https://nitter.smnz.de/search/rss?f=tweets&q=%23CodingHumor&f-images=on&e-nativeretweets=on"
filters = ["first(1)", "includelink", "includesourcetitle"]

[sources.daily_digest]
type = "merge"
sources = ["slurdge", "hackernews", "codinghumor"]
filters = ["digest(3)"]

[pipes]

[pipes.daily_digest]
source = "daily_digest"
destination = "email"
email_to = ""
email_from = "l"
email_title = "🧪 Test Digest"

image

Before (without the includesourcetitle filter):

image


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/slurdge/goeland/pull/129 **Author:** [@panigrc](https://github.com/panigrc) **Created:** 3/25/2023 **Status:** ✅ Merged **Merged:** 3/26/2023 **Merged by:** [@slurdge](https://github.com/slurdge) **Base:** `master` ← **Head:** `feature/add-includesourcetitle-filter` --- ### 📝 Commits (7) - [`1b6106b`](https://github.com/slurdge/goeland/commit/1b6106b93fd93af0e94b698adcb8fec58d7dd808) feat: Add fields to the Entry struct - [`92d1f83`](https://github.com/slurdge/goeland/commit/92d1f83be7fb162c7b30345a89912682d5e8f538) feat: Set the source in the entry when fetching - [`6ba56f5`](https://github.com/slurdge/goeland/commit/6ba56f5c5e479d123aa4c20ca62c42f634341d39) feat: Add includesourcetitle filter - [`0c5a5af`](https://github.com/slurdge/goeland/commit/0c5a5af596a771ea0e4ab39e4cf1a41617733a18) doc: Add includesourcetitle filter - [`caa3701`](https://github.com/slurdge/goeland/commit/caa3701bc4204796e9196b3b57c510f45a7a0d19) refactor: Use a pointer to the Source in the Entry - [`15ce0f7`](https://github.com/slurdge/goeland/commit/15ce0f7a41919b235feee363f101865d5fa57389) refactor: Point to the previous Source - [`902b28f`](https://github.com/slurdge/goeland/commit/902b28f115852703467945453b594f9300644480) refactor: Remove the <hr> in the Source titles ### 📊 Changes **4 files changed** (+27 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+1 -0) 📝 `internal/goeland/fetch/feed.go` (+5 -2) 📝 `internal/goeland/filters/filter.go` (+12 -0) 📝 `internal/goeland/source.go` (+9 -7) </details> ### 📄 Description This PR adds a new filter which, when enabled it will display the source title above of each group of merged entries. This will make it easier to know from which source the entry is coming from. Example: ```toml [sources] [sources.slurdge] type = "feed" url = "https://nitter.smnz.de/slurdge/rss" filters = ["first(1)", "includelink", "includesourcetitle"] [sources.hackernews] type = "feed" url = "https://hnrss.org/newest" filters = ["first(1)", "includelink", "includesourcetitle"] [sources.codinghumor] type = "feed" url = "https://nitter.smnz.de/search/rss?f=tweets&q=%23CodingHumor&f-images=on&e-nativeretweets=on" filters = ["first(1)", "includelink", "includesourcetitle"] [sources.daily_digest] type = "merge" sources = ["slurdge", "hackernews", "codinghumor"] filters = ["digest(3)"] [pipes] [pipes.daily_digest] source = "daily_digest" destination = "email" email_to = "" email_from = "l" email_title = "🧪 Test Digest" ``` ![image](https://user-images.githubusercontent.com/645895/227716050-d316308c-48f4-409e-a776-81cff2f68c5f.png) Before (without the `includesourcetitle` filter): ![image](https://user-images.githubusercontent.com/645895/227716118-8ce9ce82-6c90-49ac-bf9e-38c0dff1d383.png) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
slurdge 2026-09-29 12:59:52 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: slurdge/goeland#148
No description provided.