glanceapp / glance

A self-hosted dashboard that puts all your feeds in one place
GNU Affero General Public License v3.0
6.36k stars 199 forks source link

Alternate RSS Feed Titles #146

Open nash-an opened 1 week ago

nash-an commented 1 week ago

With certain news aggregates, it is preferred to use the source as the title for the RSS feed rather than the RSS feed's title.

For example, with https://news.google.com/news/rss, it would be better for the individual articles to use the \<source> attribute (ex. CNN) rather than the attribute (Top stories - Google News)</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/nash-an"><img src="https://avatars.githubusercontent.com/u/62453341?v=4" />nash-an</a> commented <strong> 1 week ago</strong> </div> <div class="markdown-body"> <p>Current: <img src="https://github.com/glanceapp/glance/assets/62453341/b3e56fe3-dd22-442f-83b1-8989554bf1a7" alt="image" /></p> <p>With title as \<source> (or any other custom attribute): <img src="https://github.com/glanceapp/glance/assets/62453341/90eddc9a-d524-4a6a-9c8a-3d76c4e14a38" alt="image" /></p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/nash-an"><img src="https://avatars.githubusercontent.com/u/62453341?v=4" />nash-an</a> commented <strong> 1 week ago</strong> </div> <div class="markdown-body"> <p>I am unfamiliar with Go, but I tried my hand at adding this feature:</p> <p><a href="https://github.com/nash-an/glance-rss-enhancements/commit/964c60d5fc69994a5a109f95a37627c4c9106cba">https://github.com/nash-an/glance-rss-enhancements/commit/964c60d5fc69994a5a109f95a37627c4c9106cba</a></p> <p>New config option added, <code>UseSource bool</code>. When true, RSS feed will replace the <code>rssItem.ChannelName</code> with the item's source title, rather than the specified title or feed title.</p> <p>It's not exactly an elegant solution, mostly because the gofeed library does not have the source attribute as part of its default gofeed.Feed struct, but it works.</p> </div> </div> <div class="page-bar-simple"> </div> <div class="footer"> <ul class="body"> <li>© <script> document.write(new Date().getFullYear()) </script> Githubissues.</li> <li>Githubissues is a development platform for aggregating issues.</li> </ul> </div> <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js"></script> <script src="/githubissues/assets/js.js"></script> <script src="/githubissues/assets/markdown.js"></script> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/highlight.min.js"></script> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/languages/go.min.js"></script> <script> hljs.highlightAll(); </script> </body> </html>