From 13165304677dae9a44cf56838b175adf1fcdde83 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Sat, 14 Mar 2020 14:47:34 +0300 Subject: [PATCH] Now officially it is phlogging engine too --- README | 29 +++++++++++++++++++++++------ cmd/sgblog-comment-add/mail.go | 2 +- cmd/sgblog-comment-add/main.go | 4 ++-- cmd/sgblog/gopher.go | 3 +-- cmd/sgblog/http.go | 3 +-- cmd/sgblog/main.go | 4 ++-- common.go | 2 +- 7 files changed, 31 insertions(+), 16 deletions(-) diff --git a/README b/README index 20fd5fd..282be72 100644 --- a/README +++ b/README @@ -1,12 +1,12 @@ - SGBlog -- Git-based CGI blogging engine - ======================================= + SGBlog -- Git-based CGI/inetd blogging/phlogging engine + ======================================================= DESCRIPTION -SGBlog is a simple blogging engine with a Git-based storage and CGI -interface with HTTP-server. It can be used as a cgit replacement for -readonly Git repository viewing and Atom feed generation. But it has -better features: +SGBlog is a simple blogging engine with a Git-based storage, CGI +interface for HTTP-server, inetd interface for serving as Gopher server. +It can be used as a cgit replacement for readonly Git repository viewing +and Atom feed generation. But it has better features: * URLs are tried to be converted to clickable links * SHA1 hashes are tried to be converted to blog links itself @@ -14,6 +14,7 @@ better features: * Each page has ETag and it is checked against the request for client-side caching * Pages can be gzip-compressed, depending on Accept-Encoding header +* Gopher protocol support for phlog creation * Commenting support CONFIGURATION @@ -49,6 +50,22 @@ SGBlog is configured via Hjson configuration file: CommentsEmail: something@example.com } +Gopher mode can use the same configuration file, but it requires much +less options: + + { + GitPath: /home/git/pub/stargrave-blog.git + Branch: refs/heads/english + Title: "English Stargrave's blog" + + AboutURL: http://blog.stargrave.org/ + + CommentsNotesRef: refs/notes/comments + CommentsEmail: something@example.com + + GopherDomain: phlog.stargrave.org + } + COMMENTS Each comment is just a plaintext with From and Date headers. They are diff --git a/cmd/sgblog-comment-add/mail.go b/cmd/sgblog-comment-add/mail.go index 1a347fc..45ce053 100644 --- a/cmd/sgblog-comment-add/mail.go +++ b/cmd/sgblog-comment-add/mail.go @@ -1,5 +1,5 @@ /* -SGBlog -- Git-based CGI blogging engine +SGBlog -- Git-based CGI/inetd blogging/phlogging engine Copyright (C) 2020 Sergey Matveev This program is free software: you can redistribute it and/or modify diff --git a/cmd/sgblog-comment-add/main.go b/cmd/sgblog-comment-add/main.go index 100f5f2..7233a6a 100644 --- a/cmd/sgblog-comment-add/main.go +++ b/cmd/sgblog-comment-add/main.go @@ -1,5 +1,5 @@ /* -SGBlog -- Git-based CGI blogging engine +SGBlog -- Git-based CGI/inetd blogging/phlogging engine Copyright (C) 2020 Sergey Matveev This program is free software: you can redistribute it and/or modify @@ -15,7 +15,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -// Git-based CGI blogging engine email to comments adder +// Git-based CGI/inetd blogging/phlogging engine package main import ( diff --git a/cmd/sgblog/gopher.go b/cmd/sgblog/gopher.go index e98d65b..a4a69fd 100644 --- a/cmd/sgblog/gopher.go +++ b/cmd/sgblog/gopher.go @@ -1,5 +1,5 @@ /* -SGBlog -- Git-based CGI blogging engine +SGBlog -- Git-based CGI/inetd blogging/phlogging engine Copyright (C) 2020 Sergey Matveev This program is free software: you can redistribute it and/or modify @@ -15,7 +15,6 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -// Git-based CGI blogging engine package main import ( diff --git a/cmd/sgblog/http.go b/cmd/sgblog/http.go index 9685558..a91da3c 100644 --- a/cmd/sgblog/http.go +++ b/cmd/sgblog/http.go @@ -1,5 +1,5 @@ /* -SGBlog -- Git-based CGI blogging engine +SGBlog -- Git-based CGI/inetd blogging/phlogging engine Copyright (C) 2020 Sergey Matveev This program is free software: you can redistribute it and/or modify @@ -15,7 +15,6 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -// Git-based CGI blogging engine package main import ( diff --git a/cmd/sgblog/main.go b/cmd/sgblog/main.go index f3d009a..06f1e37 100644 --- a/cmd/sgblog/main.go +++ b/cmd/sgblog/main.go @@ -1,5 +1,5 @@ /* -SGBlog -- Git-based CGI blogging engine +SGBlog -- Git-based CGI/inetd blogging/phlogging engine Copyright (C) 2020 Sergey Matveev This program is free software: you can redistribute it and/or modify @@ -15,7 +15,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -// Git-based CGI blogging engine +// Git-based CGI/inetd blogging/phlogging engine package main import ( diff --git a/common.go b/common.go index de17393..86d1e83 100644 --- a/common.go +++ b/common.go @@ -1,4 +1,4 @@ -// SGBlog -- Git-based CGI blogging engine +// SGBlog -- Git-based CGI/inetd blogging/phlogging engine package sgblog const ( -- 2.48.1