Extensible Gemini/Titan Server
=> 🔖 Tags | 🗎 File Tree | ⌥ Branches [main] | Clone URL
=> 2024-12-29 CGI: Added TITAN_EDIT environment variable; bumped version to v0.9.7 — 🔖 v0.9.7 | 2024-12-19 Bumped version to 0.9.6; updated change log — 🔖 v0.9.6 | 2024-12-19 GitView: Fixed parsing error when commit history contains CR characters | 2024-12-15 Bumped version to 0.9.5; updated change log — 🔖 v0.9.5 | 2024-10-11 Misfin: Updated format of Misfin URI in the footer | 2024-09-08 Docs: Updated copyright year | 2024-09-08 Documented missing settings | 2024-09-03 Bumped version to 0.9.4; updated readme — 🔖 v0.9.4 | More...
GmCapsule is an extensible server for Gemini and Titan.
See the User manual for configuration and usage instructions.
=> Gemini | Titan | User manual
Install "gmcapsule" via pip
:
pip install gmcapsule
Then run the server daemon:
gmcapsuled
Create the following service file and save it as ~/.config/systemd/user/gmcapsule.service:
[Unit] Description=GmCapsule: extensible Gemini/Titan server After=network.target [Service] Type=simple ExecStart=/gmcapsuled ExecReload=/bin/kill -HUP $MAINPID Restart=always Environment="PYTHONUNBUFFERED=1" StandardOutput=syslog StandardError=syslog SyslogIdentifier=gmcapsule [Install] WantedBy=default.target
Replace <YOUR-INSTALL-PATH>
with the actual path of gmcapsuled
. pip
will install it in a directory on your PATH.
Then you can do the usual:
systemctl --user daemon-reload systemctl --user enable gmcapsule systemctl --user start gmcapsule
The log can be viewed via journalctl (or syslog):
journalctl -xe --user-unit=gmcapsule
v0.9.1:
v0.9.2:
v0.9.3:
v0.9.4:
v0.9.5:
v0.9.6:
v0.9.7:
TITAN_EDIT
environment variable. It gets the value "1" when a Titan edit request is being processed.
Request
class has a new is_titan_edit
flag to indicate when a request is being processed as an edit.
PATH_INFO
: it is now URL-decoded and the script path is removed so only the part following the script path is included in the environment variable (RFC 3875, section 4.1.5).
bin_root
applies a wildcard to all found CGI executables so PATH_INFO
can be used.
bin_root
looks for executable "index.gmi" files in requested directories to provide the directory index.
stream
to the [cgi.*]
section to enable streaming output mode where the output of the CGI child process is immediately sent to the client without any buffering. Streaming is not supported if the server is using multiple processes.
v0.6.1:
processes
to the [server]
section to configure how many request handler processes are started.
Capsule
, the extension module init
method is passed a Context
. Capsule
is no longer available as global state.
Identity
no longer contains OpenSSL objects for the certificate and public key. Instead, they are provided as serialized in DER format.
v0.5.1:
Identity
class is available when importing the gmcapsule
module.
v0.5.2:
v0.5.3:
[priority]
for overriding default module priorities determined from file names. This is useful for changing the priority of the built-in modules.
v0.4.1:
status
using the ${QUERY_STRING}
variable.
Request.query
is None if there is no query string present. Previously, the query string was an empty string in this case. This allows making a distinction between empty and absent query strings.
v0.3.1:
v0.3.2:
[cgi] bin_root
configuration option for automatically and dynamically mapping all executables in a directory tree to URL entry points.
v0.2.1:
v0.2.2:
v0.2.3:
v0.2.4:
v0.2.5:
importlib
error with Python 3.11.
text/gemini; charset=utf-8
This content has been proxied by September (ba2dc).