diff options
Diffstat (limited to 'git-gmi')
-rw-r--r-- | git-gmi/config.py | 3 | ||||
-rw-r--r-- | git-gmi/const.py | 3 | ||||
-rw-r--r-- | git-gmi/gateway.py | 1 | ||||
-rw-r--r-- | git-gmi/git.py | 1 |
4 files changed, 5 insertions, 3 deletions
diff --git a/git-gmi/config.py b/git-gmi/config.py new file mode 100644 index 0000000..f136b8e --- /dev/null +++ b/git-gmi/config.py @@ -0,0 +1,3 @@ +GIT_CATALOG = "/home/fakefred/p/gemini/repos/" +CGI_PATH = "/git/cgi/" +GIT_GMI_SITE_TITLE = "git.gmi demo instance" diff --git a/git-gmi/const.py b/git-gmi/const.py index dcf97b1..11445c6 100644 --- a/git-gmi/const.py +++ b/git-gmi/const.py @@ -1,6 +1,3 @@ -GIT_CATALOG = "/home/fakefred/p/gemini/repos/" -CGI_PATH = "/git/cgi/" -GIT_GMI_SITE_TITLE = "git.gmi demo instance" STATUS_SUCCESS = "20" STATUS_NOT_FOUND = "51 NOT FOUND" STATUS_TEMPORARY_FAILURE = "40 TEMPORARY FAILURE" diff --git a/git-gmi/gateway.py b/git-gmi/gateway.py index 0ae963f..7de077e 100644 --- a/git-gmi/gateway.py +++ b/git-gmi/gateway.py @@ -1,5 +1,6 @@ from git import * from const import * +from config import * from os import environ, listdir # be careful when using print(); stdout is passed to the client. diff --git a/git-gmi/git.py b/git-gmi/git.py index c8fa5c6..a0eb5e0 100644 --- a/git-gmi/git.py +++ b/git-gmi/git.py @@ -2,6 +2,7 @@ from pygit2 import * from hurry.filesize import size, alternative import mimetypes from const import * +from config import * mimetypes.add_type("text/gemini", ".gmi") mimetypes.add_type("text/gemini", ".gemini") |