If you are reading this via Gemini [1], then welcome to my blog! Emboldened by converting HTML (HyperText Markup Language) to text for gopher [2], I decided to try my hand at converting HTML to the native Gemini text format [3] (section 5 of the specification), and I'm less than thrilled with the results and I don't think given the contraints that I could do a better job than I have.
The format has similarities to Markdown [4] but simpler, and you can't embed HTML for when Markdown has no syntax to do what you want. I mean, given that Gemini supports serving up any type of content, I could have just served up HTML, but well, I have the webserver for that. And I could have just used the plain text format I use for gopher, but the Gemini text format does allow for links, and I like my links (even if external links have a half life of about a year).
Most of the entries will look okay, it's only the occasional entry with deeply nested HTML that might look wierd.
And yes, the size of the server bloated quite a bit [5] since I reused the HTML parser, but it's something I'll just have to live with for now.
[1] https://gemini.circumlunar.space/
[3] https://gemini.circumlunar.space/docs/specification.html