Re: Gopher item type for Markdown?
Greetings.
On Fri, 14 Aug 2020 20:59:00 +0200 Matt Owen <matt@jaruzel.com> wrote:
> Hi All,
>
> I've been mulling this one over for a while... I'm thinking of adding markdown support to my Gopher client, which is relatively easy to do, but I'd like some input on:
>
> a) Is this a good thing to do? Markdown is technically still text, but some might feel that it shouldn't be part of the gopher item types.
>
> b) If the feeling is that there's no issue having support for markdown, what would be the best character to use as an item type identifier. I see that 'M' is already taken (MIME encoded resource), but lower case 'm' isn't. Obviously if I go ahead with this, the item type would need to be an agreed standard. Does anyone have any views on this?
As other people already proposed, use the file(1) magic. The most
common menu item types are 1, i, 9 and 0. Your client already needs to
run some kind of plumber script for 9 and 0.
Please do never take any item type because you feel like it. This will
always go wrong. The whole menu item type namespace should stay as it
is, to not break with backwards compatibility.
But there are multiple ways in gopher to break out of the namespace of
the menu items:
1.) file(1) or check for file extensions on whatever is given back. You
need to do this for images, video, audio already. It is the most widely
used method on the web too. There the mime type is specified everywhere
and noone really implements it properly. See how firefox can have html
in jpeg files.
2.) »M«, as stated above allows to easily have the full mime(!)-type
namespace accessible. It just needs to be implemented. It's an e-mail
you receive and decode it. MIME is hard to implement, but it would be a
proper way.
3.) Escape to a different protocol, like via »h«, as in html or the
non-standard URL: escape. This is the way to go, when someone might
think of adding SSH support to gopher. Just use »ssh://«.
Gopher has so many ways and possibilities, it is beautiful.
Sincerely,
Christoph Lohmann
Reply to: