From 0187e255a811bebb0dad3624f2c6d78b829d15c5 Mon Sep 17 00:00:00 2001
From: Syndamia 0)
- stop = appToDesc($0)
- }
- close(ARGV[1]) # FILENAME isn't set during BEGIN
-}
-
-"\\[DESCRIPTION\\]" {
- gsub("\\[DESCRIPTION\\]", desc)
-}
-
-{
- print
-}
diff --git a/generate-hooks/create-file-lists.awk b/generate-hooks/create-file-lists.awk
deleted file mode 100644
index 7d18bdd..0000000
--- a/generate-hooks/create-file-lists.awk
+++ /dev/null
@@ -1,169 +0,0 @@
-#
-# == About ==
-#
-# Each file list is a "details" element, that contains a table, each row being a different file
-# or alternatively, just the table on it's own.
-#
-# -- Result HTML --
-#
-# Folder Info
-#
-#
-# File Data
-#
-#
-
-#
-# == ftags ==
-#
-# &&folder The text right afterwards is the title of the folder. All files
-# are hidden inside the collapsed details tag (click to show).
-# The file table is indented. You cannot have a folder inside a folder.
-# It can be omitted, and the files table will be shown as-is.
-#
-# &&file Everything that follows this tag is the data for a file. You should
-# use &&fd to specify columns of information! Depending on the context,
-# it might be replaced with the start of a table, closing the summary
-# and starting table, or closing and opening a table row.
-#
-# &&/files This tag must exist at the bottom of a file list, no matter if it was
-# started with or without a &&folder.
-#
-# &&fd Defines a column of information for a file (row). Practically, it is
-# replaced with File Data
-# , and is added to the end of the line.
-# If you don't use it, make sure to have the leading and trailing td tags!
-#
-# &&ft-TYPE Depending on TYPE, it inserts an image tag that contains the file "icon"
-# for the corresponding type.
-# Available values for TYPE: photo, text, zip, movie, markdown
-#
-# -- Placement/Flow --
-#
-# All ftags, except &&fd, can be placed on their own line (empty line above and below)
-# or before/after another ftag.
-# Folder title must be inside the same paragraph as the ftag itself. This means that,
-# after
-# every &&folder ftag, the text can continue directly next to it and/or on new lines,
-# without there being any empty lines (you can add those with
or two spaces at
-# line end).
-#
-# -- Example Usage --
-#
-# (I like to indent a bit &&fd ftags, for readability's sake, but you don't have to)
-#
-# &&file
-# &&ft-text
-# &&fd Notes
-# &&fd 10 KB
-# &&/files
-#
-# &&folder Math
-# &&file
-# &&ft-text
-# &&fd Homework 1
-# &&file
-# &&ft-text
-# &&fd Homework 2
-# &&/files
-#
-# &&folder Art Project
-# Status: 70% complete
-# Note: Reserach Van Gogh paintings
-#
-# &&file
-# &&fd Painting 1
-# &&fd 100% Complete
-#
-# &&file
-# &&fd Painting 2
-# &&fd 40% Complete
-#
-# &&/files
-
-BEGIN {
- fileStarted = 0
- noFolder = 1
- searchEndP = 0 # Used to remove trailing
|<\/p>)/, "") - - # &&file - if (ind == 2 && fileStarted == 0) { - if (noFolder == 1) - gsub("&&file", "
|)&&/ {
- for (i = 1; i <= length(nam); i++) {
- if (index($0, pat[i]) != 0)
- substitute(i)
- }
-}
-
-searchEndP == 1 && /<\/p>/ {
- gsub(/<\/p>/, "")
- searchEndP = 0
-}
-
-{
- print
-}
diff --git a/generate-hooks/create-flags.awk b/generate-hooks/create-flags.awk
deleted file mode 100644
index d07901d..0000000
--- a/generate-hooks/create-flags.awk
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-# == About ==
-#
-# A collection of ftags that generate an image HTML tag, containing the specified
-# flag. This is done, because these tags need to have the unzoomable class, which
-# you can't specify in Markdown.
-
-# == ftags ==
-#
-# &&gb Great Britain flag
-#
-# -- Placement/Flow --
-#
-# They can reside absolutely anywhere in text.
-
-BEGIN {
- flag[1] = "gb"
- title[1] = "ENG"
-
- for (i = 1; i <= length(flag); i++) {
- flagExp[i] = "&&" flag[i]
- flagTag[i] = " |<\/p>)/, "")
- gsub(pat[ind], rep[ind])
- if (ended[ind] == 1)
- gsub(cpat[ind], crep[ind])
-}
-
-/^[ \t]*( |)&&/ {
- for (i = 1; i <= length(names); i++) {
- if (index($0, names[i]) != 0)
- substitute(i)
- }
-}
-
-{
- print
-}
diff --git a/generate-hooks/create-title.awk b/generate-hooks/create-title.awk
deleted file mode 100644
index 24d5f7d..0000000
--- a/generate-hooks/create-title.awk
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# == About ==
-#
-# Every page has a og:title meta tag, which has to be generated from the page
-# itself. The title tag is automatically filled in by ssg.
-# The value for the meta tag is "[TITLE]" and it gets replaced with all text
-# inside first h1 header tag.
-
-BEGIN {
- h1Index = 0
-
- # When this loop finishes, $0 will have the first line containing an h1 header
- # tag, and h1Index will have it's starting position
- while (h1Index == 0 && getline < ARGV[1])
- h1Index = index($0, " / {
- print ""
- started = 0
-}
-
-{
- print
-}
--
cgit v1.3.1-26-gb76a
"
- }
-}
-
-{
- for (i = 1; i <= length(flagExp); i++) {
- gsub(flagExp[i], flagTag[i])
- }
- print
-}
diff --git a/generate-hooks/create-header-anchors.awk b/generate-hooks/create-header-anchors.awk
deleted file mode 100644
index f6d2815..0000000
--- a/generate-hooks/create-header-anchors.awk
+++ /dev/null
@@ -1,16 +0,0 @@
-#
-# == About ==
-#
-# ssg generates an id for every heading. That's why after every heading there
-# can be a hyperlink to itself. However, because of the current styling, such a
-# hyperlink is required (except for h1).
-
-/[ \t]*
")
-}
-
-{
- print
-}
diff --git a/generate-hooks/create-pagenav.awk b/generate-hooks/create-pagenav.awk
deleted file mode 100644
index d539837..0000000
--- a/generate-hooks/create-pagenav.awk
+++ /dev/null
@@ -1,48 +0,0 @@
-#
-# == About ==
-#
-# I call pagenav the stuff directly below the first h1. These include file dates
-# and GitLab source link.
-# Currently it only works for blog and tutorial pages.
-#
-# This is by far the most hard-coded and inefficient awk script in the generate-hooks.
-# Creation and last edited dates are taken from git commits, and getting the correct info
-# by file name can easily only be done with git log, which unfortunately is very slow.
-# Another issue is that it depends on the build directories in build scripts, meaning
-# it won't work without modification if you try to build it somewhere else.
-
-BEGIN {
- fileCheck = ARGV[1] # FILENAME isn't available in BEGIN
-
- if (match(fileCheck, /(blog|tutorials)\/.*\//) == 0) {
- found = 1
- }
- else {
- found = 0
- gsub(/^.*\/(synd|tiny.synd|website|tiny.website)\//, "", fileCheck); gsub(/\.html/, ".md", fileCheck)
-
- system("git log --follow --pretty=format:%ad --date=\"format:%d %B %Y\" -- src/" fileCheck " > /tmp/syndamiadotcom-pagenav")
-
- dateCreate = ""
- dateEdited = ""
- while ((getline < "/tmp/syndamiadotcom-pagenav") > 0) {
- if (dateEdited == "") dateEdited = $0
- dateCreate = $0
- }
-
- elem = ORS \
-""
- }
-}
-
-{
- print
-}
-
-found == 0 && /
" ORS \
-"
" ORS \
-"
" ORS \
-"
" ORS \
-" " ORS \
-" "
-
- pat[1] = "&&presentation"
- rep[1] = pres
- pat[2] = "&&/font"
- rep[2] = ""
-
- for (i = 3; i <= length(names); i++) {
- pat[i] = "&&" names[i]
- rep[i] = "
]*>/, "")
- title = substr($0, h1Index, index($0, "
"
- started = 1
-}
-
-started == 1 && /