Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Packages should build-depend on what they should build-depend. -- Santiago Vila on debian-devel


devel / comp.infosystems.gemini / Gemini CGI Example in Python

SubjectAuthor
o Gemini CGI Example in PythonMartin

1
Gemini CGI Example in Python

<sub7tv$1r1m$1@gioia.aioe.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=171&group=comp.infosystems.gemini#171

  copy link   Newsgroups: comp.infosystems.gemini
Path: i2pn2.org!i2pn.org!aioe.org!d0BXyBIXJRz4thr607aoyw.user.46.165.242.75.POSTED!not-for-mail
From: martin@datapulp.de (Martin)
Newsgroups: comp.infosystems.gemini
Subject: Gemini CGI Example in Python
Date: Sun, 13 Feb 2022 16:25:46 +0100
Organization: Aioe.org NNTP Server
Message-ID: <sub7tv$1r1m$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="60470"; posting-host="d0BXyBIXJRz4thr607aoyw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Thunderbird/91.6.0
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-US
 by: Martin - Sun, 13 Feb 2022 15:25 UTC

I implemented the same CGI script I did in Bash again in Python. Well,
this is my first Python script ever, so maybe a professional would do
things different. If it can be improved, just tell me.

gemini://hubbz.de/apps/tls-input-test.py

Attention: Your Gemini browser needs to support client certificates for
authentication. Otherwise you will not be able to use my script.
Lagrange browser at least does so.

As Gemini server I use gmid from Omar Polo. The config for cgi (from my
development server on localhost) is very easy:

server "localhost" {
cert "/home/martin/MP/certs/localhost.crt"
key "/home/martin/MP/certs/localhost.key"
root "/home/martin/MP/root"
cgi "/apps/*"
lang "de"

Attention: The cgi config dir ("/apps/*") needs to be a sub-directory of
root!

Martin

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor