Summary Files Commits Branches @commit @diff @stats
path: root / generate-hooks / make-file-lists.sh
diff options
context:
space:
mode:
Commitdaab5443e76fe16642dde1fb2ef32b723fd4037b (patch)
Author
 Syndamia <kamen@syndamia.com>
2022-09-28 22:11:47 +0300
Committer
 Syndamia <kamen@syndamia.com>
2022-09-29 17:40:10 +0300
Filesa952b79a3d8ed6e3d01cc33a432248eb41e4fdfd /generate-hooks/make-file-lists.sh
syndamia.com-daab5443e76fe16642dde1fb2ef32b723fd4037b.tar
syndamia.com-daab5443e76fe16642dde1fb2ef32b723fd4037b.tar.gz
syndamia.com-daab5443e76fe16642dde1fb2ef32b723fd4037b.zip
Parent15094c5da196d0b23f41c6882a397284b2741ab0 (diff)
[hooks] Removed bash hook scripts and made awk scripts the way to generate the website
1 files changed, 0 insertions, 60 deletions
-rwxr-xr-xgenerate-hooks/make-file-lists.sh60
diff --git a/generate-hooks/make-file-lists.sh b/generate-hooks/make-file-lists.sh
deleted file mode 100755
index 87d8e61..0000000
--- a/generate-hooks/make-file-lists.sh
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/bin/bash
-
-# 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 (<td> 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:
-# <details><summary>Folder Info</summary> <table> <tr>File Data</tr> </table> </details>
-# or this:
-# <table> <tr>File Data</tr> </table>
-# 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
-# <td>Data 1</td>
-# <td>Data 1.1</td>
-# <td>Data 1.2</td>
-# &&fs
-# <td>Data 2</td>
-# <td>Data 2.1</td>
-# <td>Data 2.2</td>
-# &&fod
-#
-# or
-#
-# &&nos
-# <td>Data 1</td>
-# <td>Data 1.1</td>
-# <td>Data 1.2</td>
-# &&fs
-# <td>Data 2</td>
-# <td>Data 2.1</td>
-# <td>Data 2.2</td>
-# &&nod
-
-#
-# And the lines starting with && (I'll call them ftags) get replaced by some HTML. The <td></td> 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
-
-if [ -z "$1" ]; then
- echo First parameter must be string with file paths
- exit
-fi
-
-awkloc="$(dirname "$0")/create-file-lists.awk"
-
-for file in $1; do
- awk -f "$awkloc" $file > tmp && mv -f tmp $file
-done