💾 Archived View for tilde.cafe › ~winter › gemlog › 2022-05-09_surveypy.gmi captured on 2023-05-24 at 18:05:50. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2022-06-03)

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

CGI script for surveys on Gemini

I wrote a small Python script which can be used to run surveys (or other vote-based data collection) over Gemini.

Live demo - do you like Marmite?

Source code

[mail] Send issues and patches here!

Compatibility

I'm not sure how well this will work with other Gemini server software, but it works great with gemserv, which is what tilde.cafe uses. If you find an issue while using it with another server, please let me know and I will do my best to fix it.

Request format

To submit a response, navigate to `survey.py/<survey-name>?<response>`, for example, `gemini://example.com/cgi-bin/survey.py/mycoolsurvey?Of%20course!`. Percent-encoding will be converted. If no query-string is submitted (e.g. `gemini://example.org/cgi-bin/survey.py/mycoolsurvey`), it will ask you for input via status code 10.