OldCoderThread: Pleroma<br><br>This is an exchange between the <a class="hashtag" href="https://dansu.org/tag/pleroma" rel="nofollow noopener noreferrer" target="_blank">#Pleroma</a> lead developer and myself related to <a class="hashtag" href="https://dansu.org/tag/rss" rel="nofollow noopener noreferrer" target="_blank">#RSS</a> support.<br><br>====<br><br>Date: July 13, 2024 09:19pm PT<br>To: Pleroma developers<br>Cc: Fossies<br>Subject: Re: Possible Pleroma patch<br><br>Jens, it might make sense to add Pleroma-BE aka Pleroma Backend to Fossies. Mark Felder, to whom this email is addressed, is one of the lead developers. Note: If you add Pleroma-FE aka Pleroma Frontend as well, the two codebases should be registered as separate projects.<br><br>Mr. Felder, thanks for responding.<br><br>1. I looked at the existing approaches to RSS for Pleroma. It appeared that none would work presently. So, I wrote a new posting tool today.<br><br>It's presently a single-file Perl script that uses XPath to parse RSS and/or Atom feeds and the Pleroma API to post individual items. GUIDs stored in small external DBs are used to prevent redundant posts.<br><br>Posts are sorted in reverse chronological order. High-volume feeds are set to unlisted so as to avoid filling up the timelines. Note: That part is hardcoded on a per-feed basis and not autodetected.<br><br>2. I'm CC'g Dr. Jens Schleusener of Fossies. I wrote the tool in part because I thought that <a class="hashtag" href="https://dansu.org/tag/fossies" rel="nofollow noopener noreferrer" target="_blank">#Fossies</a> should have a <a class="hashtag" href="https://dansu.org/tag/fediverse" rel="nofollow noopener noreferrer" target="_blank">#Fediverse</a> presence.<br><br>3. I've compiled and run Pleroma since 2020 or 2021. It's formally a part of my Linux distro (Laclin). However, I hadn't learned Elixir until today. So, I may not be qualified to make significant changes for a while. However, the points quoted below are appreciated.<br><br>4. I'd like to encourage the Pleroma group to continue work despite the relatively small market share of the project.<br><br>I ran Mastodon for a while before Pleroma and it was simply too heavy. I feel that Pleroma is an important alternative. Docker or Podman could be used to simplify setup for less technical would-be self-hosts.<br><br>5. I can't comment on Akkoma yet except to say that it might be in the interest of both groups to provide robust migration paths in both directions.<br><br>Regards, Robert (the Old Coder)<br><br>On 07/13/2024 08:18 PM, Mark Felder wrote:<br>><br>> I had an RSS bot written in Python that I used for posting from a bot account and it was very useful, so RSS client functionality is interesting to me<br>><br>> It might be cleanest to put the logic of whether or not to try backfilling in the Oban worker in lib/pleroma/workers. When it gets these jobs, just return :ok. The unique job constraint should prevent it from wasting resources.<br>><br>> Another thought I have is to do it in the Card module where the caching logic lies and have it always put in a nil cache entry for these which will prevent it from trying to make any backfill jobs<br><br>====<br><br>Mr. Felder was responding to the following letter from me to the Pleroma group:<br><br>Date: July 13, 2024 08:00pm PT<br>To: Pleroma developers<br>Subject: Possible Pleroma patch<br><br>I'm not submitting this patch as a pull request because the change should probably be done differently.<br><br>I've added RSS support to my Pleroma instance. In my view, RSS is a must-have feature. I've been looking forward to having Google News in my instance and it's working now. I've also added Fossies to support the developer of that project.<br><br>However, if I set "ignore_hosts" in "prod.secret.exs" to include "news.google.com", the setting is ignored. The result is that I end up with numerous copies of the Google News panel. The existing "ignore_hosts" code is present and debug statements show that it runs. However, that code has no effect.<br><br>The patch below fixes the problem for me. But how would you approach this fix?<br><br>Note: If you'd like to see this change [and RSS] in action, the link is:<br><a href="https://dansu.org/@News" rel="nofollow noopener noreferrer" target="_blank">https://dansu.org/@News</a><br><br>By the way, I've been running Pleroma for 4 to 5 years. But I've only started to tweak my instance seriously this year.<br><br>Regards, Robert (the Old Coder)<br><br>--- pleroma-git.old/lib/pleroma/web/rich_media/card.ex<br>+++ pleroma-git/lib/pleroma/web/rich_media/card.ex<br><br> def get_by_url(url) when is_binary(url) do<br>- if @config_impl.get([:rich_media, :enabled]) do<br>+ host = <a href="http://URI.parse(url).host" rel="nofollow noopener noreferrer" target="_blank">URI.parse(url).host</a><br>+ if @config_impl.get([:rich_media, :enabled]) and<br>+host not in @config_impl.get([:rich_media, :ignore_hosts], [])<br>+do<br> <br> def get_or_backfill_by_url(url, opts \\ []) do<br>- if @config_impl.get([:rich_media, :enabled]) do<br>+ host = <a href="http://URI.parse(url).host" rel="nofollow noopener noreferrer" target="_blank">URI.parse(url).host</a><br>+ if @config_impl.get([:rich_media, :enabled]) and<br>+host not in @config_impl.get([:rich_media, :ignore_hosts], [])<br>+do<br><br>(end of document)