From d450e3bfb8468c617f14ad12dd98fb697ff10580 Mon Sep 17 00:00:00 2001
From: tslil clingman <>
Date: Wed, 21 Apr 2021 14:52:08 -0400
Subject: compiling l-3.space for the web
---
atom.xml | 32 ++++++++------
gmi2html.py | 131 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
index-log.gmi | 1 +
index.gmi | 1 +
log-210421-1.gmi | 55 +++++++++++++++++++++++
5 files changed, 207 insertions(+), 13 deletions(-)
create mode 100644 gmi2html.py
create mode 100644 log-210421-1.gmi
diff --git a/atom.xml b/atom.xml
index 9c22db3..ddc536c 100644
--- a/atom.xml
+++ b/atom.xml
@@ -2,25 +2,13 @@
gemini://l-3.space/l-3.space
- 2021-04-15T17:06:04.403000+00:00
+ 2021-04-21T18:50:32.944000+00:00tslilhello@l-3.space
-
- gemini://l-3.space/split-keys.gmi
- Qubes split-SSH
- 2020-09-04T18:43:09.049000+00:00
-
-
-
- gemini://l-3.space/dwm.gmi
- Why tiling
- 2020-09-07T17:48:25.575000+00:00
-
- gemini://l-3.space/log-201116-1.gmiPlausible authorship deniability
@@ -57,4 +45,22 @@
2021-04-15T17:06:04.403000+00:00
+
+ gemini://l-3.space/dwm.gmi
+ Why tiling
+ 2021-04-20T18:22:32.170000+00:00
+
+
+
+ gemini://l-3.space/split-keys.gmi
+ Qubes split-SSH
+ 2021-04-20T18:23:16.337000+00:00
+
+
+
+ gemini://l-3.space/log-210421-1.gmi
+ l-3.space is now automatically compiled to the web
+ 2021-04-21T18:50:32.944000+00:00
+
+
diff --git a/gmi2html.py b/gmi2html.py
new file mode 100644
index 0000000..e102380
--- /dev/null
+++ b/gmi2html.py
@@ -0,0 +1,131 @@
+#!/usr/bin/env python3
+
+# Convert gemtext to HTML, accepting HTML header and footer files
+
+# Copyright 2021 huntingb
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, version 3 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see https://www.gnu.org/licenses/.
+
+# Original code found at:
+# https://github.com/huntingb/gemtext-html-converter
+
+# Modified by tslil clingman, April 2021 in the following ways
+# - added HTML escaping of all non-pre lines
+# - added header and footer file input
+# - added generation of
...
for list items
+# - fixed stripping of lines, no longer occurs in pre blocks, and
+# otherwise is rstrip only
+# - replace := syntax with something my version of python3 accepts
+# - modified description below
+
+"""
+HUNTER'S SIMPLE GEMTEXT TO HTML CONVERTER
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+A simple script that converts gemtext to HTML.
+
+Takes four arguments from stdin. The first two arguments are the names
+of files which will be used as a header and footer for the generated
+output, in that order.
+
+The next argument is the name of of a gemtext file, and the last
+argument is the name of the desired output file.
+
+The output file consists of, in order: the header; the lines of
+gemtext in the input file converted to their HTML equivalents: