💾 Archived View for tilde.team › ~smokey › logs › 2022-07-20-rss-proxy.gmi captured on 2023-09-28 at 16:37:51. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2023-01-29)
-=-=-=-=-=-=-
There has been recent discussion of RSS feeds in gemini, and probably generally since the inception of the protocol. Here is my two cents.
other recent articles on the subject:
re: thoughts on RSS by idiomrotting
Self Hosting Feed Reader by ew0k
I have a e-reader with the KOReader software on it. Part of that software is a RSS/atom aggregator/downloader. I currently read gemini on the ereader through the experemental browser and mozz's proxy, but it would be nice to get those articles through the inbuilt feed downloader so I can read them offline in epub format.
The issue is that most standard RSS/atom readers are not built to handle alternate protocol urls. Its probably a simple implementation or re-tooling to be able to interpret these protocols version of atom/rss xmls. Thats not the way to go about it though.
MAYBE just maybe if its an open source feed reader and accepts pull request, and you are a dev familiar in the programming language the reader is written in, and its possible to implement these urls without adding additional libraries and depenencies to the reader, it might be possible.
So, lets be realistic, its not happening, and if one feed reader did do all that it wouldn't fix all the others that didn't or cant. We have to work the issue the other way, how to make alt protocol feeds accesable to all standard RSS readers. The same way we make gemini capsules accesable to web browsers: proxies.
First lets discuss the much more developed gemini-to-https proxies which exist in the wild today. These proxies take the associated gemini URL, parse the gemtext into a http markdown format, and send that converted data to your web-client.
mozz.us mozz.us gemini-to-https proxy
Vulpes.one gemini-to-https proxies
Theoretically, atom feeds could work much the same way. The only problem with feed readers and gemini is their inabilityto get the content through the alt- protocol, so just serve the same feed markdown through the HTTPS protocol.
this theoretical protocol would need to take a gemini/gopher/whatever ATOM index, and reformat the gemtext atom into a more acceptable https atom.xml format complete with block formatting.
in gemtext this feed looks like
# ew0k is a Teddybear ## Cotton-brained, but kinnda nice to have around This Atom XML document has been automatically translated to a Gemini feed to allow subscribing to it. => gemini://warmedal.se/~bjorn/posts/2022-06-16-would-1950s-living-standards-save-us-.gmi 2022-06-16 - Would 1950s Living Standards Save Us?
meanwhile lets look at that same atom feed formatted into HTML markdown
<feed> <id>https://warmedal.se/~bjorn/</id> <title>Björn Wärmedal</title> <updated>2022-07-20T06:38:16+00:00</updated> <author> <name>Björn Wärmedal</name> <email>bjorn.warmedal@gmail.com</email> </author> <link href="https://warmedal.se/~bjorn/atom.xml" rel="self"/> <link href="https://warmedal.se/~bjorn/" rel="alternate"/> <subtitle>Personal blog of Björn Wärmedal</subtitle> <entry> <id> https://warmedal.se/~bjorn/posts/2022-06-01-i-bought-a-sofa-bed-that-wasn-t-for-sale.html </id> <title>I Bought a Sofa Bed That Wasn't For Sale</title> <updated>2022-06-01T19:28:37+00:00</updated> <link href="https://warmedal.se/~bjorn/posts/2022-06-01-i-bought-a-sofa-bed-that-wasn-t-for-sale.html" rel="alternate"/> <content type="html"> <h1>I Bought a Sofa Bed That Wasn't For Sale</h1> <p>I needed a sofa bed and started looking around. The only one that fit my criteria was the IKEA Nyhamn. The problem was that it doesn't currently exist.</p> <p>To be more precise hardly any IKEA store (at least here in Sweden) has it in because of logistical issues. And they don't know when they'll have it again; they can't even guesstimate which month it might come back.</p> <p>This was all confirmed to me by the support staff. I asked them if I could buy one of the two they had on exhibition in the store here in town, and they politely told me no. They don't sell the show pieces unless the model is being phased out.</p> <p>But a no isn't really a no when it comes from the wrong person. I went to the store, found the manager for the sofa section, pointed to the one I wanted and said "I want to buy that - exactly that - sofa". They gave me confused look, but when I explained what customer support had told me they verified it: an order was placed for more, but it had no known delivery date.</p> <p>They looked at the sofa, then at me, then back at the sofa. Then they shrugged and said "I guess it would be much better if I put something there that I can actually sell."</p> <p>Best part: because it's a show piece I got it for almost half price.</p> <p>I had to go home and get my car, and picking it apart in just the right way to be able to load it in was a hassle. But it's here in my home now!</p> </content> </entry> <entry>
Yikes.
So here we see the fundimental difference between the two, one is a simple link list, the other is a block-based XML. Ew0k has also chosen to format their HTTPS atom with the complete content of the log inside of the feed along with the link, formatted as HTML markdown. This bulks things up quite a bit. Fortunately this is completely optional, and other feeds like marginalia's https://memex.marginalia.nu/atom.xml chooses to simplify the index to something like this:
<?xml version="1.0" encoding="UTF-8" ?> <feed xmlns="http://www.w3.org/2005/Atom"> <title>marginalia.nu/log</title> <subtitle>Gemlog</subtitle> <link href="https://memex.marginalia.nu/log" /> <author> <name>marginalia</name> <email>kontakt@marginalia.nu</email> </author> <id>https://memex.marginalia.nu/</id> <updated>2022-07-14T15:09:59+02:00</updated> <entry> <title>On Prescriptive Descriptions [ 2022-07-14 ]</title> <link href="https://memex.marginalia.nu/log/60-prescriptive-descriptions.gmi" /> <id>https://memex.marginalia.nu/log/60-prescriptive-descriptions.gmi</id> <updated>2022-07-14T00:00:00Z</updated> </entry>
This is more along the lines of what a converted output of a gemini atom should look like. A simple feed filled with links to the articl and some metadata.
As an outline, heres what needs to happen for the proxy to work. Lets say mozz.us implements this function to its atom interpeter.
1. your rss reader connects to https://portal.mozz.us/gemini/warmedal.se/~bjorn/atom.xml
That atom feed in this case looks like
<feed> <id>gemini://warmedal.se/~bjorn/</id> <title>ew0k is a Teddybear</title> <updated>2022-07-20T06:38:24+00:00</updated> <author> <name>ew0k</name> <email>bjorn.warmedal@gmail.com</email> </author> <link href="gemini://warmedal.se/~bjorn/atom.xml" rel="self"/> <link href="gemini://warmedal.se/~bjorn/" rel="alternate"/> <subtitle>Cotton-brained, but kinnda nice to have around</subtitle> <entry> <id> gemini://warmedal.se/~bjorn/posts/2022-06-16-would-1950s-living-standards-save-us-.gmi </id> <title>Would 1950s Living Standards Save Us?</title> <updated>2022-06-16T12:18:09+00:00</updated> <link href="gemini://warmedal.se/~bjorn/posts/2022-06-16-would-1950s-living-standards-save-us-.gmi" rel="alternate"/> </entry>
2. the mozz.us proxy service detects its an atom feed, and ammends every instance of the " gemini://" string in urls to instead be [https-proxy-url]/[gemini-url]
<feed> <id>https://portal.mozz.us/gemini/warmedal.se/~bjorn/</id> <title>ew0k is a Teddybear</title> <updated>2022-07-20T06:38:24+00:00</updated> <author> <name>ew0k</name> <email>bjorn.warmedal@gmail.com</email> </author> <link href="https://portal.mozz.us/gemini/warmedal.se/~bjorn/atom.xml" rel="self"/> <link href="https://portal.mozz.us/gemini/warmedal.se/~bjorn/" rel="alternate"/> <subtitle>Cotton-brained, but kinnda nice to have around</subtitle> <entry> <id> https://portal.mozz.us/gemini/warmedal.se/~bjorn/posts/2022-06-16-would-1950s-living-standards-save-us-.gmi </id> <title>Would 1950s Living Standards Save Us?</title> <updated>2022-06-16T12:18:09+00:00</updated> <link href="https://portal.mozz.us/gemini/warmedal.se/~bjorn/posts/2022-06-16-would-1950s-living-standards-save-us-.gmi" rel="alternate"/> </entry>
3. portal.mozz.us then sends this ammended feed to the feed client.
It seems like a fairly simple process, but Im sure im missing something somewhere.
the mozz.us proxy can handle spartan urls so no need to change there. HOWEVER! gopher would need another proxy url like
If we can get a proper gemini atom to html feed reader bridge going, it wouldn't be such a stretch to convert gemsub indexes to atom.xmls using the same process.
The great thing about gemini is the many different services and bridges currently being built to port web content to gemini clients, but not as much attention has gone into porting gemini content to web clients. People like Acidus,marmaladefoo, Krixano, and mozz, have made great contributions to this rapidly developing field of bridging the gaps between the two nets.
While the actual public proxy part is complicated, self hosting a simple proxy service that takes in atom.xml feeds and spits out the converted counterpart is totally possible. Much like how a local duckling proxy takes in html and strips them down into gemtext to send to the gemini client, a similar service takes in gemini atom.xmls and beefs them up a little into the http markdown format and appends all gemini:// links to point to the public proxy alternatives.
If you are a capsule creator, it may be possible to generate a seperate feed specifically formatted with https proxies as mentioned above. I will look into this.