summaryrefslogtreecommitdiff
path: root/README.md
blob: a339f2aaea5ab6c0aec17cc7b0a7f5e12107dc51 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# git.gmi - git frontend CGI script

## Front Matter

You may find it strange how I wrote a CGI script when there are so many amazing things available, and you're right. Git.gmi isn't meant to be a CGI script; it _had_ to be one. The only Gemini server library I know in Python, [Jetforce](https://github.com/michael-lazar/jetforce), is licensed under the [Floodgap "Free" Software License](https://www.floodgap.com/software/ffsl/), which is free software but well, free as in beer. I find absolutely no reason to allow proprietization but prohibit monetization, which is the _exact opposite_ from the GPL - unfortunately the license of choice by the `pygit2` devs. So here we are, locked in restrictions of both fundamental dependencies that don't get along with each other. I once comtemplated violating FFSL, before coming up with this workaround, i.e. CGI. Git.gmi is licensed under GPLv2 eventually.

The CGI script, `cgi.py`, prints output to stdout as response to the user, the one thing I'm uncomfortable with because it disables the One True Debugger. As an extra workaround, I just used `raise Exception('debug message')` everywhere (but deleted all of them before committing, ofc).

It's in the MVP stage, with the ability to view summary, trees, blobs, and commit log in a primitive way. There is a test instance at `gemini://fkfd.me/git/cgi.py/`.

## Usage

TODO

You need to edit the shebang of `cgi.py`.