[...]
Now, it is possible to obtain a better conversion by spending more
effort: in particular lynx (which of course was never designed for
this task) is inadequate in preserving markup information. It is
possible to parse HTML instead, and start from an AST. On the other
hand some fault lies in the HTML source document as well: The
document could have used, for example, CSS for icons instead of <img> elements when the content was not significant enough to deserve
translation. However some style information only encoded in CSS
would be significant for translation: had I used CSS in the place of old-style <tt> elements, recognising “code”-type elements would have
been an issue. My html-to-gemini or html-to-gopher conversion would
need a lot of the complexity I want to avoid.
I have come to believe that the only really practical solution is
translating in the opposite direction: starting from a simple and
clean markup (I would say Gemini) and from that generating other
simple markups (Gopher) and the legacy system (HTML). This can and
should handle relative, intra-server links.
I have come to believe that the only really practical solution is
translating in the opposite direction: starting from a simple and clean markup (I would say Gemini) and from that generating other simple
markups (Gopher) and the legacy system (HTML). This can and should
handle relative, intra-server links.
In principle, markdown -> gemtext suffers from the same issues as HTML
gemtext (loss of information due to moving to a format with fewersupported features), but much less information is lost as markdown is
much closer to gemtext to begin with.
I'm guessing the main thing you are missing in gemtext is inline links.
gemini://ageinghacker.net/test-conversion.gmi
Disgusted by the web with its anti-features, its enormous gratuitous complexity and its essentially proprietary nature (the effort of re-implementing a significant component from scratch is unrealistic for single developers), I have recently opened Gemini and Gopher services
After experimenting for one day or two I have to admit that the result
is disappointing. The conversion is unnatural and I find that at the
same time some important information is lost (<tt> and <pre>) while some which is irrelevant is preserved (icons). Having out-of-line links does
not help readability when references are numerous.
I have come to believe that the only really practical solution is
translating in the opposite direction: starting from a simple and clean markup (I would say Gemini) and from that generating other simple
markups (Gopher) and the legacy system (HTML). This can and should
handle relative, intra-server links.
To me the lack of control on preformatted text is more serious than the
lack of inline links, possibly because of the technical topics I
normally write about.
Not being able to display source code clearly is a fatal flaw for me;
and notice how Gopher is less flawed than Gemini in this sense, by
virtue of being less abstract.
How do you, and other people here, solve the problem? Do you write
sites accessible only to Gemini or only to Gopher?
On 23/01/2022 16:58, Luca Saiu wrote:
To me the lack of control on preformatted text is more serious than the
lack of inline links, possibly because of the technical topics I
normally write about.
Not being able to display source code clearly is a fatal flaw for me;
and notice how Gopher is less flawed than Gemini in this sense, by
virtue of being less abstract.
What is the issue you are having with pre-formatted text?
Line numbering and syntax highlighting are the main things that come
to mind - I think these could be achieved on the client side, though
I'm not aware of any client that currently does so.
(I know there was some discussion of syntax highlighting in
pre-formatted text on the mailing list a while ago; the majority view seemed to
be that the alt text part of the pre-formatted text block could indicate the language, though some disagreed with using alt text in that way).
How do you, and other people here, solve the problem? Do you write
sites accessible only to Gemini or only to Gopher?
Personally I publish only to Gemini; however, I write very little
anyway (really just my gemlog, which is not updated all that often) so
I don't claim to be any kind of example to follow.
I have come to believe that the only really practical solution is
translating in the opposite direction: starting from a simple and clean markup (I would say Gemini) and from that generating other simple
markups (Gopher) and the legacy system (HTML). This can and should
handle relative, intra-server links.
--
Luca Saiu -- http://ageinghacker.net
I support everyone's freedom of mocking any opinion or belief, no
matter how deeply held, with open disrespect and the same unrelented enthusiasm of a toddler who has just learned the word "poo".
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 459 |
Nodes: | 16 (2 / 14) |
Uptime: | 153:34:39 |
Calls: | 9,343 |
Calls today: | 1 |
Files: | 13,538 |
Messages: | 6,084,265 |