From 2ef98138dfd0c34097899710a657eb6b3dedc9ab Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 25 Mar 2023 15:43:03 +0200 Subject: Update content for gemtext --- ...22-08-27-gemtexter-1.1.0-lets-gemtext-again.gmi | 4 +- ...-03-25-gemtexter-2.0.0-lets-gemtext-again-2.gmi | 145 +++++++++++++++++++++ .../DRAFT-gemtexter-1.1.0-lets-gemtext-again-2.gmi | 145 +++++++++++++++++++++ gemfeed/atom.xml | 131 ++++++++++++++++++- gemfeed/index.gmi | 1 + 5 files changed, 422 insertions(+), 4 deletions(-) create mode 100644 gemfeed/2023-03-25-gemtexter-2.0.0-lets-gemtext-again-2.gmi create mode 100644 gemfeed/DRAFT-gemtexter-1.1.0-lets-gemtext-again-2.gmi (limited to 'gemfeed') diff --git a/gemfeed/2022-08-27-gemtexter-1.1.0-lets-gemtext-again.gmi b/gemfeed/2022-08-27-gemtexter-1.1.0-lets-gemtext-again.gmi index 28d1bb32..feadb065 100644 --- a/gemfeed/2022-08-27-gemtexter-1.1.0-lets-gemtext-again.gmi +++ b/gemfeed/2022-08-27-gemtexter-1.1.0-lets-gemtext-again.gmi @@ -14,7 +14,9 @@ jgs `"""""""""` ``` -I am proud to announce that I've released Gemtexter version `1.1.0`. What is Gemtexter? It's my static site generator written in GNU Bash. +I am proud to announce that I've released Gemtexter version `1.1.0`. What is Gemtexter? It's my minimalist static site generator written in GNU Bash. + +=> https://codeberg.org/snonux/gemtexter It has been around a year since I released the first version `1.0.0`. Although, there aren't any groundbreaking changes, there have been a couple of smaller commits and adjustments. I was quite surprised that I received a bunch of feedback and requests about Gemtexter so it means that I am not the only person in the universe actually using it. diff --git a/gemfeed/2023-03-25-gemtexter-2.0.0-lets-gemtext-again-2.gmi b/gemfeed/2023-03-25-gemtexter-2.0.0-lets-gemtext-again-2.gmi new file mode 100644 index 00000000..c5d19bc1 --- /dev/null +++ b/gemfeed/2023-03-25-gemtexter-2.0.0-lets-gemtext-again-2.gmi @@ -0,0 +1,145 @@ +# Gemtexter 2.0.0 - Let's Gemtext again^2 + +``` +-=[ typewriters ]=- 1/98 + + .-------. + _|~~ ~~ |_ .-------. + =(_|_______|_)= _|~~ ~~ |_ + |:::::::::| =(_|_______|_) + |:::::::[]| |:::::::::| + |o=======.| |:::::::[]| + jgs `"""""""""` |o=======.| + mod. by Paul Buetow `"""""""""` +``` + +I proudly announce that I've released Gemtexter version `2.0.0`. What is Gemtexter? It's my minimalist static site generator written in GNU Bash. + +=> https://codeberg.org/snonux/gemtexter + +This is a new major release, so it contains a breaking change (see "Meta cache made obsolete"). + +Let's list what's new! + +## Minimal template engine + +Gemtexter now supports templating, enabling dynamically generated content to `.gmi` files before converting anything to any output format like HTML and Markdown. + +A template file name must have the suffix `gmi.tpl`. A template must be put into the same directory as the Gemtext `.gmi` file to be generated. Gemtexter will generate a Gemtext file `index.gmi` from a given template `index.gmi.tpl`. A `<<<` and `>>>` encloses a multiline template. All lines starting with `<< ` will be evaluated as a single line of Bash code and the output will be written into the resulting Gemtext file. + +For example, the template `index.gmi.tpl`: + +``` +# Hello world + +<< echo "> This site was generated at $(date --iso-8601=seconds) by \`Gemtexter\`" + +Welcome to this capsule! + +<<< + for i in {1..10}; do + echo Multiline template line $i + done +>>> +``` + +... results into the following `index.gmi` after running `./gemtexter --generate` (or `./gemtexter --template`, which instructs to do only template processing and nothing else): + +``` +# Hello world + +> This site was generated at 2023-03-15T19:07:59+02:00 by `Gemtexter` + +Welcome to this capsule! + +Multiline template line 1 +Multiline template line 2 +Multiline template line 3 +Multiline template line 4 +Multiline template line 5 +Multiline template line 6 +Multiline template line 7 +Multiline template line 8 +Multiline template line 9 +Multiline template line 10 +``` + +Another thing you can do is insert an index with links to similar blog posts. E.g.: + +``` +See more entries about DTail and Golang: + +<< template::inline::index dtail golang + +Blablabla... +``` + +... scans all other post entries with `dtail` and `golang` in the file name and generates a link list like this: + +``` +See more entries about DTail and Golang: + +=> ./2022-10-30-installing-dtail-on-openbsd.gmi 2022-10-30 Installing DTail on OpenBSD +=> ./2022-04-22-programming-golang.gmi 2022-04-22 The Golang Programming language +=> ./2022-03-06-the-release-of-dtail-4.0.0.gmi 2022-03-06 The release of DTail 4.0.0 +=> ./2021-04-22-dtail-the-distributed-log-tail-program.gmi 2021-04-22 DTail - The distributed log tail program (You are currently reading this) + +Blablabla... +``` + +## Added hooks + +You can configure `PRE_GENERATE_HOOK` and `POST_PUBLISH_HOOK` to point to scripts to be executed before running `--generate`, or after running `--publish`. E.g. you could populate some of the content by an external script before letting Gemtexter do its thing or you could automatically deploy the site after running `--publish`. + +The sample config file `gemtexter.conf` includes this as an example now; these scripts will only be executed when they actually exist: + +``` +declare -xr PRE_GENERATE_HOOK=./pre_generate_hook.sh +declare -xr POST_PUBLISH_HOOK=./post_publish_hook.sh +``` + +## Use of safer Bash options + +Gemtexter now does `set -euf -o pipefile`, which helps to eliminate bugs and to catch scripting errors sooner. Previous versions only `set -e`. + +## Meta cache made obsolete + +Here is the breaking change to older versions of Gemtexter. The `$BASE_CONTENT_DIR/meta` directory was made obsolete. `meta` was used to store various information about all the blog post entries to make generating an Atom feed in Bash easier. Especially the publishing dates of each post were stored there. Instead, the publishing date is now encoded in the `.gmi` file. And if it is missing, Gemtexter will set it to the current date and time at first run. + +An example blog post without any publishing date looks like this: + +``` +% cat gemfeed/2023-02-26-title-here.gmi +# Title here + +The remaining content of the Gemtext file... +``` + +Gemtexter will add a line starting with `> Published at ...` now. Any subsequent Atom feed generation will then use that date. + +``` +% cat gemfeed/2023-02-26-title-here.gmi +# Title here + +> Published at 2023-02-26T21:43:51+01:00 + +The remaining content of the Gemtext file... +``` + +## XMLLint support + +Optionally, when the `xmllint` binary is installed, Gemtexter will perform a simple XML lint check against the Atom feed generated. This is a double-check of whether the Atom feed is a valid XML. + +## More + +Additionally, there were a couple of bug fixes, refactorings and overall improvements in the documentation made. + +Other related posts are: + +=> ./2022-08-27-gemtexter-1.1.0-lets-gemtext-again.gmi 2022-08-27 Gemtexter 1.1.0 - Let's Gemtext again +=> ./2021-06-05-gemtexter-one-bash-script-to-rule-it-all.gmi 2021-06-05 Gemtexter - One Bash script to rule it all +=> ./2021-04-24-welcome-to-the-geminispace.gmi 2021-04-24 Welcome to the Geminispace + +E-Mail your comments to hi@paul.cyou :-) + +=> ../ Back to the main site diff --git a/gemfeed/DRAFT-gemtexter-1.1.0-lets-gemtext-again-2.gmi b/gemfeed/DRAFT-gemtexter-1.1.0-lets-gemtext-again-2.gmi new file mode 100644 index 00000000..c5d19bc1 --- /dev/null +++ b/gemfeed/DRAFT-gemtexter-1.1.0-lets-gemtext-again-2.gmi @@ -0,0 +1,145 @@ +# Gemtexter 2.0.0 - Let's Gemtext again^2 + +``` +-=[ typewriters ]=- 1/98 + + .-------. + _|~~ ~~ |_ .-------. + =(_|_______|_)= _|~~ ~~ |_ + |:::::::::| =(_|_______|_) + |:::::::[]| |:::::::::| + |o=======.| |:::::::[]| + jgs `"""""""""` |o=======.| + mod. by Paul Buetow `"""""""""` +``` + +I proudly announce that I've released Gemtexter version `2.0.0`. What is Gemtexter? It's my minimalist static site generator written in GNU Bash. + +=> https://codeberg.org/snonux/gemtexter + +This is a new major release, so it contains a breaking change (see "Meta cache made obsolete"). + +Let's list what's new! + +## Minimal template engine + +Gemtexter now supports templating, enabling dynamically generated content to `.gmi` files before converting anything to any output format like HTML and Markdown. + +A template file name must have the suffix `gmi.tpl`. A template must be put into the same directory as the Gemtext `.gmi` file to be generated. Gemtexter will generate a Gemtext file `index.gmi` from a given template `index.gmi.tpl`. A `<<<` and `>>>` encloses a multiline template. All lines starting with `<< ` will be evaluated as a single line of Bash code and the output will be written into the resulting Gemtext file. + +For example, the template `index.gmi.tpl`: + +``` +# Hello world + +<< echo "> This site was generated at $(date --iso-8601=seconds) by \`Gemtexter\`" + +Welcome to this capsule! + +<<< + for i in {1..10}; do + echo Multiline template line $i + done +>>> +``` + +... results into the following `index.gmi` after running `./gemtexter --generate` (or `./gemtexter --template`, which instructs to do only template processing and nothing else): + +``` +# Hello world + +> This site was generated at 2023-03-15T19:07:59+02:00 by `Gemtexter` + +Welcome to this capsule! + +Multiline template line 1 +Multiline template line 2 +Multiline template line 3 +Multiline template line 4 +Multiline template line 5 +Multiline template line 6 +Multiline template line 7 +Multiline template line 8 +Multiline template line 9 +Multiline template line 10 +``` + +Another thing you can do is insert an index with links to similar blog posts. E.g.: + +``` +See more entries about DTail and Golang: + +<< template::inline::index dtail golang + +Blablabla... +``` + +... scans all other post entries with `dtail` and `golang` in the file name and generates a link list like this: + +``` +See more entries about DTail and Golang: + +=> ./2022-10-30-installing-dtail-on-openbsd.gmi 2022-10-30 Installing DTail on OpenBSD +=> ./2022-04-22-programming-golang.gmi 2022-04-22 The Golang Programming language +=> ./2022-03-06-the-release-of-dtail-4.0.0.gmi 2022-03-06 The release of DTail 4.0.0 +=> ./2021-04-22-dtail-the-distributed-log-tail-program.gmi 2021-04-22 DTail - The distributed log tail program (You are currently reading this) + +Blablabla... +``` + +## Added hooks + +You can configure `PRE_GENERATE_HOOK` and `POST_PUBLISH_HOOK` to point to scripts to be executed before running `--generate`, or after running `--publish`. E.g. you could populate some of the content by an external script before letting Gemtexter do its thing or you could automatically deploy the site after running `--publish`. + +The sample config file `gemtexter.conf` includes this as an example now; these scripts will only be executed when they actually exist: + +``` +declare -xr PRE_GENERATE_HOOK=./pre_generate_hook.sh +declare -xr POST_PUBLISH_HOOK=./post_publish_hook.sh +``` + +## Use of safer Bash options + +Gemtexter now does `set -euf -o pipefile`, which helps to eliminate bugs and to catch scripting errors sooner. Previous versions only `set -e`. + +## Meta cache made obsolete + +Here is the breaking change to older versions of Gemtexter. The `$BASE_CONTENT_DIR/meta` directory was made obsolete. `meta` was used to store various information about all the blog post entries to make generating an Atom feed in Bash easier. Especially the publishing dates of each post were stored there. Instead, the publishing date is now encoded in the `.gmi` file. And if it is missing, Gemtexter will set it to the current date and time at first run. + +An example blog post without any publishing date looks like this: + +``` +% cat gemfeed/2023-02-26-title-here.gmi +# Title here + +The remaining content of the Gemtext file... +``` + +Gemtexter will add a line starting with `> Published at ...` now. Any subsequent Atom feed generation will then use that date. + +``` +% cat gemfeed/2023-02-26-title-here.gmi +# Title here + +> Published at 2023-02-26T21:43:51+01:00 + +The remaining content of the Gemtext file... +``` + +## XMLLint support + +Optionally, when the `xmllint` binary is installed, Gemtexter will perform a simple XML lint check against the Atom feed generated. This is a double-check of whether the Atom feed is a valid XML. + +## More + +Additionally, there were a couple of bug fixes, refactorings and overall improvements in the documentation made. + +Other related posts are: + +=> ./2022-08-27-gemtexter-1.1.0-lets-gemtext-again.gmi 2022-08-27 Gemtexter 1.1.0 - Let's Gemtext again +=> ./2021-06-05-gemtexter-one-bash-script-to-rule-it-all.gmi 2021-06-05 Gemtexter - One Bash script to rule it all +=> ./2021-04-24-welcome-to-the-geminispace.gmi 2021-04-24 Welcome to the Geminispace + +E-Mail your comments to hi@paul.cyou :-) + +=> ../ Back to the main site diff --git a/gemfeed/atom.xml b/gemfeed/atom.xml index 7ee1e528..e7f021a7 100644 --- a/gemfeed/atom.xml +++ b/gemfeed/atom.xml @@ -1,11 +1,135 @@ - 2023-03-24T17:43:19+02:00 + 2023-03-25T15:42:46+02:00 foo.zone feed To be in the .zone! gemini://foo.zone/ + + Gemtexter 2.0.0 - Let's Gemtext again^2 + + gemini://foo.zone/gemfeed/2023-03-25-gemtexter-2.0.0-lets-gemtext-again-2.gmi + 2023-02-26T21:43:51+01:00 + + Paul Buetow + hi@paul.cyou + + I proudly announce that I've released Gemtexter version `2.0.0`. What is Gemtexter? It's my minimalist static site generator written in GNU Bash. + +
+

Gemtexter 2.0.0 - Let's Gemtext again^2

+
+-=[ typewriters ]=-  1/98
+
+       .-------.
+      _|~~ ~~  |_       .-------.
+    =(_|_______|_)=    _|~~ ~~  |_
+      |:::::::::|    =(_|_______|_)
+      |:::::::[]|      |:::::::::|
+      |o=======.|      |:::::::[]|
+ jgs  `"""""""""`      |o=======.|
+  mod. by Paul Buetow  `"""""""""`
+

+

I proudly announce that I've released Gemtexter version 2.0.0. What is Gemtexter? It's my minimalist static site generator written in GNU Bash.

+https://codeberg.org/snonux/gemtexter
+

This is a new major release, so it contains a breaking change (see "Meta cache made obsolete").

+

Let's list what's new!

+

Minimal template engine

+

Gemtexter now supports templating, enabling dynamically generated content to .gmi files before converting anything to any output format like HTML and Markdown.

+

A template file name must have the suffix gmi.tpl. A template must be put into the same directory as the Gemtext .gmi file to be generated. Gemtexter will generate a Gemtext file index.gmi from a given template index.gmi.tpl. A <<< and >>> encloses a multiline template. All lines starting with << will be evaluated as a single line of Bash code and the output will be written into the resulting Gemtext file.

+

For example, the template index.gmi.tpl:

+
+# Hello world
+
+<< echo "> This site was generated at $(date --iso-8601=seconds) by \`Gemtexter\`"
+
+Welcome to this capsule!
+
+<<<
+  for i in {1..10}; do
+    echo Multiline template line $i
+  done
+>>>
+

+

... results into the following index.gmi after running ./gemtexter --generate (or ./gemtexter --template, which instructs to do only template processing and nothing else):

+
+# Hello world
+
+> This site was generated at 2023-03-15T19:07:59+02:00 by `Gemtexter`
+
+Welcome to this capsule!
+
+Multiline template line 1
+Multiline template line 2
+Multiline template line 3
+Multiline template line 4
+Multiline template line 5
+Multiline template line 6
+Multiline template line 7
+Multiline template line 8
+Multiline template line 9
+Multiline template line 10
+

+

Another thing you can do is insert an index with links to similar blog posts. E.g.:

+
+See more entries about DTail and Golang:
+
+<< template::inline::index dtail golang
+
+Blablabla...
+

+

... scans all other post entries with dtail and golang in the file name and generates a link list like this:

+
+See more entries about DTail and Golang:
+
+=> ./2022-10-30-installing-dtail-on-openbsd.gmi 2022-10-30 Installing DTail on OpenBSD
+=> ./2022-04-22-programming-golang.gmi 2022-04-22 The Golang Programming language
+=> ./2022-03-06-the-release-of-dtail-4.0.0.gmi 2022-03-06 The release of DTail 4.0.0
+=> ./2021-04-22-dtail-the-distributed-log-tail-program.gmi 2021-04-22 DTail - The distributed log tail program (You are currently reading this)
+
+Blablabla...
+

+

Added hooks

+

You can configure PRE_GENERATE_HOOK and POST_PUBLISH_HOOK to point to scripts to be executed before running --generate, or after running --publish. E.g. you could populate some of the content by an external script before letting Gemtexter do its thing or you could automatically deploy the site after running --publish.

+

The sample config file gemtexter.conf includes this as an example now; these scripts will only be executed when they actually exist:

+
+declare -xr PRE_GENERATE_HOOK=./pre_generate_hook.sh
+declare -xr POST_PUBLISH_HOOK=./post_publish_hook.sh
+

+

Use of safer Bash options

+

Gemtexter now does set -euf -o pipefile, which helps to eliminate bugs and to catch scripting errors sooner. Previous versions only set -e.

+

Meta cache made obsolete

+

Here is the breaking change to older versions of Gemtexter. The $BASE_CONTENT_DIR/meta directory was made obsolete. meta was used to store various information about all the blog post entries to make generating an Atom feed in Bash easier. Especially the publishing dates of each post were stored there. Instead, the publishing date is now encoded in the .gmi file. And if it is missing, Gemtexter will set it to the current date and time at first run.

+

An example blog post without any publishing date looks like this:

+
+% cat gemfeed/2023-02-26-title-here.gmi
+# Title here
+
+The remaining content of the Gemtext file...
+

+

Gemtexter will add a line starting with > Published at ... now. Any subsequent Atom feed generation will then use that date.

+
+% cat gemfeed/2023-02-26-title-here.gmi
+# Title here
+
+> Published at 2023-02-26T21:43:51+01:00
+
+The remaining content of the Gemtext file...
+

+

XMLLint support

+

Optionally, when the xmllint binary is installed, Gemtexter will perform a simple XML lint check against the Atom feed generated. This is a double-check of whether the Atom feed is a valid XML.

+

More

+

Additionally, there were a couple of bug fixes, refactorings and overall improvements in the documentation made.

+

Other related posts are:

+2022-08-27 Gemtexter 1.1.0 - Let's Gemtext again
+2021-06-05 Gemtexter - One Bash script to rule it all
+2021-04-24 Welcome to the Geminispace
+

E-Mail your comments to hi@paul.cyou :-)

+Back to the main site
+
+
+
'The Pragmatic Programmer' book notes @@ -863,7 +987,7 @@ jgs (________\ \ Paul Buetow hi@paul.cyou - I am proud to announce that I've released Gemtexter version `1.1.0`. What is Gemtexter? It's my static site generator written in GNU Bash. + I am proud to announce that I've released Gemtexter version `1.1.0`. What is Gemtexter? It's my minimalist static site generator written in GNU Bash.

Gemtexter 1.1.0 - Let's Gemtext again

@@ -879,7 +1003,8 @@ jgs (________\ \ |o=======.| jgs `"""""""""`
-

I am proud to announce that I've released Gemtexter version 1.1.0. What is Gemtexter? It's my static site generator written in GNU Bash.

+

I am proud to announce that I've released Gemtexter version 1.1.0. What is Gemtexter? It's my minimalist static site generator written in GNU Bash.

+https://codeberg.org/snonux/gemtexter

It has been around a year since I released the first version 1.0.0. Although, there aren't any groundbreaking changes, there have been a couple of smaller commits and adjustments. I was quite surprised that I received a bunch of feedback and requests about Gemtexter so it means that I am not the only person in the universe actually using it.

What's new?

Automatic check for GNU version requirements

diff --git a/gemfeed/index.gmi b/gemfeed/index.gmi index 6a540c33..8893ff60 100644 --- a/gemfeed/index.gmi +++ b/gemfeed/index.gmi @@ -2,6 +2,7 @@ ## To be in the .zone! +=> ./2023-03-25-gemtexter-2.0.0-lets-gemtext-again-2.gmi 2023-03-25 - Gemtexter 2.0.0 - Let's Gemtext again^2 => ./2023-03-16-the-pragmatic-programmer-book-notes.gmi 2023-03-16 - 'The Pragmatic Programmer' book notes => ./2023-02-26-how-to-shut-down-after-work.gmi 2023-02-26 - How to shut down after work => ./2023-01-23-why-grapheneos-rox.gmi 2023-01-23 - Why GrapheneOS rox -- cgit v1.2.3