💾 Archived View for rawtext.club › ~sloum › geminilist › 005341.gmi captured on 2023-11-04 at 14:02:24. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2021-11-30)
-=-=-=-=-=-=-
Remco me at rwv.io
Thu Feb 18 08:21:20 GMT 2021
- - - - - - - - - - - - - - - - - - -
2021/02/18 09:07, Lars Noodén:
I've looked at the Gemini specification [1] and wonder where I can find
information about receiving search or other input from the client.
Perhaps I am missing something obvious, as I see that there are a
growing number of interesting, searchable capsules [2] but have not yet
seen how to do that. My goal is to implement a local search function
for a capsule being built.
So I have two questions,
1) What markup should a gemini page contain to trigger an input dialog,
and where may I see some sample code or pseudo code for the server-side?
If anyone has any sample- psuedo code to share, that would be
wonderful.
Here's an example of a very basic CGI script written in Ruby:
gemini://rwv.io/src/search
It triggers a "10" response when there's no query set, otherwise itreturns a "20" response with links to all the files matching the query.In this case it simple greps through the gemini directory.
Note, it doesn't do query string decoding so, depending on the server,you might have to do some for "special" characters.
2) Which servers are light yet can still handle referrals to scripts, or
is that best handled by a separate package and let the server deal with
static pages only?
Any light server supporting CGI should be fine.
Cheers,Remco