A proposed scheme for parsing preformatted alt text

Luke Emmet luke at marmaladefoo.com
Mon Sep 7 17:28:14 BST 2020


On 07-Sep-2020 01:47, Sean Conner wrote:
> I read the article linked, and I think a better format would be:
>
> ``` mumble mumble label text mumble; attribute1=value1; attribute2=value2
>
>    Skip the CSS rules since they aren't used in Gemini, but the attributes
> for MIME *are* used, and those use the format I've shown above.  If you can
> parse MIME types, you can reuse *that* code to parse attributes.
>
> ```here is a table in CSV; content-type=text/csv; lang=en_US;

That's a possibility. Either formats are simple enough to parse I think.

> The format for tables is *horrible* (at least in my opinion).  The format
> I use to generate tables (ultimately in HTML) is the following:
>
> *header1	header2	header3	header4
> **footer1	footer2	footer3	footer4
> row-11	row-12	row-13	row-14
> row-21	row-22	row-23	row-24

Yes I think people have jumped on the specific example of table parsing 
I gave. The example is a quote from Bouncepaw's original post, and was 
to illustrate primarily how the parameters are used in the alt text, not 
to propose a new format. Maybe that aspect wasn't clear enough.

The particular format for a table I don't endorse - CSV or TSV is more 
natural and the mime type is already defined.

I'll clarify the example so its clear I'm not proposing a new format for 
text based tables.

>    So your table example:
>
> ```Here is a table; content-type=text/tsv; lang=en
> *+	1	2	3
> 1	2	3	4
> 2	3	4	5
> 3	4	5	6
> ```
>
>    (Yeah, way eaiser to type than '|' between each field)

Yes I agree, as you illustrate, using TSV or CSV is probably better.

> Just my two zorkmids worth. I don't really have a horse in this race, as
> I don't really care for the current gemini text format anyway, and this is
> adding complexity to a simple format, but that is solerpunk's call, not
> mine.

I'm not proposing this needs to be institutionalised in the spec 
(although that would be cool).

Rather this is instead what I have in mind is more like a community 
practice. For example people are sometimes using unicode superscript or 
square bracket footnotes to indicate a citation marker for links.

Best Wishes

  - Luke




More information about the Gemini mailing list