💾 Archived View for rawtext.club › ~sloum › geminilist › 005491.gmi captured on 2024-02-05 at 11:10:18. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2021-11-30)

-=-=-=-=-=-=-

<-- back to the mailing list

Supporting multi-line input without changing the specification

Katarina Eriksson gmym at coopdot.com

Tue Feb 23 00:40:36 GMT 2021

- - - - - - - - - - - - - - - - - - - 

Since we're still getting proposals, I'm writing something I read somewheregemini related. I do not claim I invented this myself. (Except the codes atthe bottom.)

Objective

Provide a way for users to send bigger chunks of text to the server.

User experience

Support for regular status 10 input, CGI and client certificates assumed.

Clients with multi-line support

The reader klicks a link. A text box, with a label from the meta part,appears. The reader writes and sends the message.

Clients without multi-line support

The reader klicks a link. An input field, with a label from the metapart, appears.The reader writes the first line, end the line with a marker character tosignal a wish to continue and sends the request. The server responds with anew input until it doesn’t receive that marker character.

It should be easier to exit the loop than to continue.

Servers

The writer puts a script (or a symlink to a script) in a reasonablelocation and link to it in gemtext. The script handles the incoming texts.

Behind the scenes

The server needs to indicate to the client that it expects a multi-linetext. One way is to send a new 1x status, like 12, but that is a specchange. Other ways are to use a specific file name extension or a keywordin the meta field.

I must admit I prefer the new status code over the others. Other options?

The client needs to indicate to the server that it wants to continue thetext in another request. I have chosen & since it doesn't need to beescaped and doesn't have a specific meaning yet in gemini.

Example

S: "10 New guest book entry (multi)\r\n"C: "gemini://guestbook.example/new.multi?Neat%20that%20you%20can%20post%20multi-line%20texts.&n\r\n"S: "10 (more)\r\n"C: "gemini://guestbook.example/new.multi?I%20wonder%20if%20clients%20will%20adopt%20it.\r\n"

Codes

I have written a script to experiment with user experience. These are thecodes I came up with:

These codes are made to be typed by a human. A client translating a textbox could just put "%0a" to break a line and end the input with a "&" whenit reaches the maximum request length to continue in the next request.

-- Katarina-------------- next part --------------An HTML attachment was scrubbed...URL: <https://lists.orbitalfox.eu/archives/gemini/attachments/20210223/ed698236/attachment.htm>