iadd $STAGIT_BASEURL environment variable to make Atom links absolute - stagit-gemini - Stagit for gemini protocol Openbsd Err thinkerwim.openbsd.amsterdam 70 hgit clone git://thinkerwim.org/stagit-gemini.git URL:git://thinkerwim.org/stagit-gemini.git thinkerwim.org 70 1Log /git/stagit-gemini/log.gph thinkerwim.org 70 1Files /git/stagit-gemini/files.gph thinkerwim.org 70 1Refs /git/stagit-gemini/refs.gph thinkerwim.org 70 1README /git/stagit-gemini/file/README.gph thinkerwim.org 70 1LICENSE /git/stagit-gemini/file/LICENSE.gph thinkerwim.org 70 i--- Err thinkerwim.openbsd.amsterdam 70 1commit a4d283cbe995468334872de7c5bff0ef5633c747 /git/stagit-gemini/commit/a4d283cbe995468334872de7c5bff0ef5633c747.gph thinkerwim.org 70 1parent a8a22b38a884641557532a52eff67ad3ba530d30 /git/stagit-gemini/commit/a8a22b38a884641557532a52eff67ad3ba530d30.gph thinkerwim.org 70 hAuthor: Hiltjo Posthuma URL:mailto:hiltjo@codemadness.org thinkerwim.org 70 iDate: Fri, 5 Mar 2021 11:52:44 +0100 Err thinkerwim.openbsd.amsterdam 70 i Err thinkerwim.openbsd.amsterdam 70 iadd $STAGIT_BASEURL environment variable to make Atom links absolute Err thinkerwim.openbsd.amsterdam 70 i Err thinkerwim.openbsd.amsterdam 70 iAnd to specify the correct gopher type. Err thinkerwim.openbsd.amsterdam 70 i Err thinkerwim.openbsd.amsterdam 70 iWith feedback from adc, thanks! Err thinkerwim.openbsd.amsterdam 70 i Err thinkerwim.openbsd.amsterdam 70 iDiffstat: Err thinkerwim.openbsd.amsterdam 70 i M stagit-gopher.1 | 12 +++++++++++- Err thinkerwim.openbsd.amsterdam 70 i M stagit-gopher.c | 8 ++++++-- Err thinkerwim.openbsd.amsterdam 70 i Err thinkerwim.openbsd.amsterdam 70 i2 files changed, 17 insertions(+), 3 deletions(-) Err thinkerwim.openbsd.amsterdam 70 i--- Err thinkerwim.openbsd.amsterdam 70 1diff --git a/stagit-gopher.1 b/stagit-gopher.1 /git/stagit-gemini/file/stagit-gopher.1.gph thinkerwim.org 70 i@@ -1,4 +1,4 @@ Err thinkerwim.openbsd.amsterdam 70 i-.Dd July 19, 2020 Err thinkerwim.openbsd.amsterdam 70 i+.Dd March 4, 2021 Err thinkerwim.openbsd.amsterdam 70 i .Dt STAGIT-GOPHER 1 Err thinkerwim.openbsd.amsterdam 70 i .Os Err thinkerwim.openbsd.amsterdam 70 i .Sh NAME Err thinkerwim.openbsd.amsterdam 70 i@@ -95,6 +95,16 @@ primary clone url of the repository, for example: git://git.2f30.org/stagit Err thinkerwim.openbsd.amsterdam 70 i .Pp Err thinkerwim.openbsd.amsterdam 70 i When a README or LICENSE file exists in HEAD or a .gitmodules submodules file Err thinkerwim.openbsd.amsterdam 70 i exists in HEAD a direct link in the index is made. Err thinkerwim.openbsd.amsterdam 70 i+.Sh ENVIRONMENT Err thinkerwim.openbsd.amsterdam 70 i+.Bl -tag -width Ds Err thinkerwim.openbsd.amsterdam 70 i+.It Ev STAGIT_BASEURL Err thinkerwim.openbsd.amsterdam 70 i+Base URL to make links in atom.xml absolute. Err thinkerwim.openbsd.amsterdam 70 i+Does not use the prefix from the -b option. Err thinkerwim.openbsd.amsterdam 70 i+It should include the gopher type. Err thinkerwim.openbsd.amsterdam 70 i+For example: STAGIT_BASE_URL="gopher://codemadness.org/1/git/stagit-gopher/". Err thinkerwim.openbsd.amsterdam 70 i+.El Err thinkerwim.openbsd.amsterdam 70 i+.Sh EXIT STATUS Err thinkerwim.openbsd.amsterdam 70 i+.Ex -std Err thinkerwim.openbsd.amsterdam 70 i .Sh SEE ALSO Err thinkerwim.openbsd.amsterdam 70 i .Xr stagit-gopher-index 1 Err thinkerwim.openbsd.amsterdam 70 i .Sh AUTHORS Err thinkerwim.openbsd.amsterdam 70 1diff --git a/stagit-gopher.c b/stagit-gopher.c /git/stagit-gemini/file/stagit-gopher.c.gph thinkerwim.org 70 i@@ -62,6 +62,7 @@ struct referenceinfo { Err thinkerwim.openbsd.amsterdam 70 i Err thinkerwim.openbsd.amsterdam 70 i static git_repository *repo; Err thinkerwim.openbsd.amsterdam 70 i Err thinkerwim.openbsd.amsterdam 70 i+static const char *baseurl = ""; /* base URL to make absolute RSS/Atom URI */ Err thinkerwim.openbsd.amsterdam 70 i static const char *relpath = ""; Err thinkerwim.openbsd.amsterdam 70 i static const char *repodir; Err thinkerwim.openbsd.amsterdam 70 i Err thinkerwim.openbsd.amsterdam 70 i@@ -913,8 +914,8 @@ printcommitatom(FILE *fp, struct commitinfo *ci, const char *tag) Err thinkerwim.openbsd.amsterdam 70 i xmlencode(fp, ci->summary, strlen(ci->summary)); Err thinkerwim.openbsd.amsterdam 70 i fputs("\n", fp); Err thinkerwim.openbsd.amsterdam 70 i } Err thinkerwim.openbsd.amsterdam 70 i- fprintf(fp, "\n", Err thinkerwim.openbsd.amsterdam 70 i- ci->oid); Err thinkerwim.openbsd.amsterdam 70 i+ fprintf(fp, "\n", Err thinkerwim.openbsd.amsterdam 70 i+ baseurl, ci->oid); Err thinkerwim.openbsd.amsterdam 70 i Err thinkerwim.openbsd.amsterdam 70 i if (ci->author) { Err thinkerwim.openbsd.amsterdam 70 i fputs("\n", fp); Err thinkerwim.openbsd.amsterdam 70 i@@ -1289,6 +1290,9 @@ main(int argc, char *argv[]) Err thinkerwim.openbsd.amsterdam 70 i } Err thinkerwim.openbsd.amsterdam 70 i #endif Err thinkerwim.openbsd.amsterdam 70 i Err thinkerwim.openbsd.amsterdam 70 i+ if ((p = getenv("STAGIT_BASEURL"))) Err thinkerwim.openbsd.amsterdam 70 i+ baseurl = p; Err thinkerwim.openbsd.amsterdam 70 i+ Err thinkerwim.openbsd.amsterdam 70 i if (git_repository_open_ext(&repo, repodir, Err thinkerwim.openbsd.amsterdam 70 i GIT_REPOSITORY_OPEN_NO_SEARCH, NULL) < 0) { Err thinkerwim.openbsd.amsterdam 70 i fprintf(stderr, "%s: cannot open repository\n", argv[0]); Err thinkerwim.openbsd.amsterdam 70 .