=> Re: "I have a Gemini capsule as well as a gopherhole that run on..." | In: s/Gemini
This may not be exactly relevant for your question, but I'll talk about trying to proxy a gemini server to gopher. I've tried dealing with converting gemtext documents to gophermaps in SIS when proxying gemini to gopher, and it's actually pretty awful for a couple of reasons:
So here's what SIS does when it converts/proxies gemtext documents to gophermaps:
First, if the resource ends in a "/", it's going to get converted into a gophermap by the proxy, so all links that end in "/" will be itemtype 1.
Second, look at the extension at the end of the URL, and convert the extension to its proper gopher itemtype. If no extension is provided, then you have to assume it's a text document because there's no other way of knowing without making a request to that resource on the server.
Lastly, if it's a link to a static file on your own server (that you are proxying), then look at the file (or route) to get the filetype.
If you add in zzo38's method above as well, then you'll get very close to having something that works at least 75% of the time, lol.
If people know of other better tricks for this, I'd definitely be happy to hear them.
=> 馃殌 clseibold
Jan 19 路 12 days ago
=> 馃 Arkholt [OP] 路 Jan 19 at 20:57:
This is great! This is the kind of thing I was thinking of, but I'm not very skilled in regex so I wasn't able to figure out how it was supposed to go. Thanks for pointing me in the right direction!
=> 馃寬 s/Gemini
I have a Gemini capsule as well as a gopherhole that run on separate servers, and I don't use a proxy. I like to keep the content on both the same, which is fairly easy to do for the most part as converting from gemtext to plaintext is very simple. The issue I have is with the gophermaps. In the past I have taken the links on my Gemini index pages and manually typed out the Gopher versions into gophermaps, but this is incredibly tedious to do. Is there some way to more easily and simply convert...
=> 馃挰 Arkholt 路 6 comments 路 Jan 18 路 13 days ago This content has been proxied by September (3851b).Proxy Information
text/gemini; charset=utf-8