diff options
| Commit | 0187e255a811bebb0dad3624f2c6d78b829d15c5 (patch) | |
|---|---|---|
| Author | 2023-01-17 16:15:28 +0200 | |
| Committer | 2023-01-17 16:15:28 +0200 | |
| Files | 68efd3520e72c8c8c553fdda7b9391d9ec4e9feb /awk-edits/README.md | |
| syndamia.com-0187e255a811bebb0dad3624f2c6d78b829d15c5.tar syndamia.com-0187e255a811bebb0dad3624f2c6d78b829d15c5.tar.gz syndamia.com-0187e255a811bebb0dad3624f2c6d78b829d15c5.zip | ||
| Parent | da000c477625bb533688df84bd95ba3a3aff3246 (diff) | |
[awk] Reworked generation to happen via a combined script, updated scripts and added info in scripts readme
1 files changed, 25 insertions, 0 deletions
| -rw-r--r-- | awk-edits/README.md | 25 |
diff --git a/awk-edits/README.md b/awk-edits/README.md new file mode 100644 index 0000000..a9d1c77 --- /dev/null +++ b/awk-edits/README.md @@ -0,0 +1,25 @@ +All `.awk` files in this folder are ran by `generate.sh` and `generate-dev.sh`, after ssg and lowdown have created all HTML pages. These files are meant to work on the resultant HTML. + +For improved efficiency, rather than running every script seperately, they are meant to be concatinated into one script (`generate.sh` and `generate-dev.sh` combine them in `/tmp/syndamiadotcom-awk`), which is ran for each HTML file. +This forces us to work with the following constraints: + +- NO awk script should print the current line (print should only be used to add new lines) + The script that starts with '\_' contains the print of the current line, all scripts that start with a capital letter are ran before it and all with small letter - after. + + If we print the current line in every script, the concatenated will print the current line multiple times +- Variable names between scripts must be unique +- `exit` mustn't be used! + Instead, use a variable and then add a check to every relevant rule. + +## ftags + +ftags are strings/words in the Markdown source files, that start with "&&" and continue with any (valid) sequence of characters. The name initially stood for "file tags", since I got the idea while making the file lists functionality. Now I like to think of them as "format tags", since they are used for so much more. + +On the "backend", they just get replaced with specific HTML. List of scripts that handle ftags: + +|Script|ftags| +|---|---| +|`File-lists.awk`|`&&folder`, `&&file`, `&&/files`, `&&ft-TYPE` *(TYPE is one of `photo`, `text`, `zip`, `movie`, `markdown`)*| +|`Flags.awk`|`&&gb`| +|`Presentation.awk`|`&&presentation`, `&&slide`, `&&/slide`, `&&flexer`, `&¢ered`, `&&/centered`, `&&fow`, `&&/fow`, `&&fcol`, `&&/fcol`, `&&fontSIZE` *(SIZE is one of `18`, `20`, `27`, `30`, `37`)*, `&&/font`| + +Information regarding their usage can be found at the top of their respective script file. |