💾 Archived View for rawtext.club › ~sloum › geminilist › 007107.gmi captured on 2024-02-05 at 10:52:01. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2021-11-30)
-=-=-=-=-=-=-
Jonathan McHugh indieterminacy at libre.brussels
Mon Sep 13 09:34:14 BST 2021
- - - - - - - - - - - - - - - - - - -
Hi mntn,
I have been wondering about the use of alttext details for formatting.
In the next couple of months I shall be experimenting with Parsing Expression Grammars. The idea is to build PEGs, using content from manpages and cheatsheets. I plan on doing it in the (regex and multidimensional array friendly) Lisp, TXR.
Hopefully it may be possible to identify when a command is being issued and deduce the format of the outputted code.
Of course, providing a switch 'sh' could open up things.
Even more so providing something with precision of software stacks may prove even more fruitful
Some ideas for a tonk client:* Reading that block and even generating an additional block with the (referenced) output below* Splitting a block containing both input commands and the outputs into seperate (and referenced) blocks Should I make any headway Ill be sure to inform the ML. ====================Jonathan McHughindieterminacy at libre.brussels September 12, 2021 8:14 PM, mntn at mntn.xyz wrote: > I'm interested in opinions on syntax highlighting for preformatted text. Gemini has a lot of > potential for distraction-free developer reference (I just discovered that godocs.io works in > Gemini!) and syntax highlighting would help. > > In Markdown, you can add hints to preformatted text blocks like so: > > ```html > <p>This is HTML</p> > ``` > > This tells the client that the preformatted block is HTML, so the client can present the code in > whatever way makes the most sense. Usually this is syntax highlighting, but I could imagine some > clients adding collapsable code blocks based on tags, braces, and/or indentation depending on the > language. > > The Gemtext spec would seem to have no problem with this, as the first line is considered "alt > text" and it is up to the client to determine both what should be done with it and how it should > affect the presentation. But I wanted to put this out there to get a broader perspective. > > I've started on a patch for adding this to amfora, since the chroma library (also used by Hugo) can > do syntax highlighting with ANSI escape codes, for use in terminals. It works, but it's got a > couple of rendering bugs at the moment. Discussion and screenshot here: > https://github.com/makeworld-the-better-one/amfora/issues/252