From daab5443e76fe16642dde1fb2ef32b723fd4037b Mon Sep 17 00:00:00 2001 From: Syndamia Date: Wed, 28 Sep 2022 22:11:47 +0300 Subject: [hooks] Removed bash hook scripts and made awk scripts the way to generate the website --- generate-hooks/create-file-lists.awk | 48 ++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) (limited to 'generate-hooks/create-file-lists.awk') diff --git a/generate-hooks/create-file-lists.awk b/generate-hooks/create-file-lists.awk index c94ad71..4a0f2f6 100644 --- a/generate-hooks/create-file-lists.awk +++ b/generate-hooks/create-file-lists.awk @@ -1,3 +1,51 @@ +# This is a really rudementary way to make making file lists less HTML-y +# I made it so: +# 1) You don't have to write quite as much HTML +# 2) The Data columns for each file get to be formatted as Markdown ( is not recognized as a block-level element, so the stuff inside get formatted https://kristaps.bsd.lv/lowdown/lowdown.5.html#HTML_Blocks) + +# Very roughly, each file list has either this: +#
Folder Info File Data
+# or this: +# File Data
+# structure, the difference being that in the first, all of the files are in a folder. + +# In Markdown you type in something like (without the "# " in front): +# +# &&fos +# Description +# &&fs0 +# Data 1 +# Data 1.1 +# Data 1.2 +# &&fs +# Data 2 +# Data 2.1 +# Data 2.2 +# &&fod +# +# or +# +# &&nos +# Data 1 +# Data 1.1 +# Data 1.2 +# &&fs +# Data 2 +# Data 2.1 +# Data 2.2 +# &&nod + +# +# And the lines starting with && (I'll call them ftags) get replaced by some HTML. The around each file Data is mandatory. +# &&fs0 must only be used on before the very first file data, when files are in a folder. There must be no empty lines, lines mustn't start with spaces, there mustn't be anything around ftags and ftags have to be on their own lines. +# The commands have fairly intuitive abbreviations: +# &&nos no folder start (start file list, without making a folder) +# &&fos folder start +# &&fs0 file start of first file in folder (must only be used when items are in a folder!) +# &&fs file start +# &&nod no folder end (end file list, without having made a folder) +# &&fod folder end + { gsub(/&&nos/, "") gsub(/^

&&fos$/, "

") -- cgit v1.3.1-26-gb76a