Metadata-Version: 2.1
Name: gmcapsule
Version: 0.3.0
Summary: Extensible Gemini/Titan server
Project-URL: Home-page, https://geminispace.org/gmcapsule/
Project-URL: Documentation, https://geminispace.org/gmcapsule/gmcapsule.html
Project-URL: Source, https://codeberg.org/skyjake/gmcapsule
Project-URL: Issues, https://codeberg.org/skyjake/gmcapsule/issues
Author-email: Jaakko Keränen <jaakko.keranen@iki.fi>
Keywords: gemini,internet,server,titan
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.6
Classifier: Topic :: Internet
Classifier: Topic :: System :: Networking
Requires-Python: >=3.6
Requires-Dist: pyopenssl>=21
Description-Content-Type: text/markdown

GmCapsule is an extensible server for [Gemini](https://gemini.circumlunar.space/) and [Titan](https://transjovian.org/titan/).

See the [User manual](https://geminispace.org/gmcapsule/gmcapsule.html) for configuration and usage instructions.

## Installation

Install "gmcapsule" via `pip`:

    pip install gmcapsule

Then run the server daemon:

    gmcapsuled

## Running via systemd

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=<YOUR-INSTALL-PATH>/gmcapsuled
    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.service
    systemctl --user start gmcapsule

The log can be viewed via journalctl (or syslog):

    journalctl -xe --user-unit=gmcapsule

## Change log

### v0.3

* Added a shutdown event for custom background workers.
* `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.2

* Added `[cgi] bin_root` configuration option for automatically and dynamically mapping all executables in a directory tree to URL entry points.
* Minor documentation updates.
* Published on PyPi as "gmcapsule".

v0.2.1:

* Fixed error handling. Exceptions are now caught and the error message is printed.

v0.2.2:

* Reduced required Python version to 3.6 (f-strings).
* Added systemd instructions.

v0.2.3:

* Requests exceeding 1024 bytes should result in an error code and not just be ignored.
* Respond with an error code to malformed UTF-8 in the request.
* Verify that the port number in the request URI matches the server's port.

v0.2.4:

* Fixed an error in the Markdown parser.

v0.2.5:

* Fixed handling of exceptions from request handler, and print a traceback.
* Fixed `importlib` error with Python 3.11.

### v0.1

* Initial public release.