diff options
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. |