diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/README.md b/README.md index 309c0b7..12dcc90 100644 --- a/README.md +++ b/README.md | |||
@@ -9,11 +9,11 @@ that all fits within 1000 bytes. | |||
9 | There are three main scripts: | 9 | There are three main scripts: |
10 | 10 | ||
11 | <ul> | 11 | <ul> |
12 | <li><strong>UNK</strong> (253 bytes), a POSIX-sh script that applies | 12 | <li><strong>UNK</strong> (239 bytes), a POSIX-sh script that applies |
13 | the template to each page and publishes them to the output dir,</li> | 13 | the template to each page and publishes them to the output dir,</li> |
14 | <li><strong>LHT</strong> (241 bytes), an awk script that serves as | 14 | <li><strong>LHT</strong> (241 bytes), an awk script that serves as |
15 | a (very) basic markup language, and</li> | 15 | a (very) basic markup language, and</li> |
16 | <li><strong>TM</strong> (502 bytes), | 16 | <li><strong>L</strong> (502 bytes), |
17 | the default template script for <strong>UNK</strong>.</li> | 17 | the default template script for <strong>UNK</strong>.</li> |
18 | </ul> | 18 | </ul> |
19 | 19 | ||
@@ -37,7 +37,7 @@ and involved as you like, but it's pretty good already: | |||
37 | <a href="https://github.com/duckwork/unk"><strong>GITHUB MIRROR</strong></a> | 37 | <a href="https://github.com/duckwork/unk"><strong>GITHUB MIRROR</strong></a> |
38 | 38 | ||
39 | To install __UNK__, simply clone this repo and put it where you want it. | 39 | To install __UNK__, simply clone this repo and put it where you want it. |
40 | The default __TM__ needs __LHT__ to be in the same directory as it, | 40 | The default __L__ needs __LHT__ to be in the same directory as it, |
41 | so keep that in mind. | 41 | so keep that in mind. |
42 | 42 | ||
43 | To run __UNK__, just `cd` into your cloned repo and run `./unk`. | 43 | To run __UNK__, just `cd` into your cloned repo and run `./unk`. |
@@ -49,7 +49,7 @@ It's just a POSIX shell script. | |||
49 | 49 | ||
50 | __UNK__ takes a set of files in a directory, applies a template to them, | 50 | __UNK__ takes a set of files in a directory, applies a template to them, |
51 | and output them into another directory as HTML files ready for a server. | 51 | and output them into another directory as HTML files ready for a server. |
52 | To keep a very small size, __UNK__ delegates most file processing to __TM__, | 52 | To keep a very small size, __UNK__ delegates most file processing to __L__, |
53 | the main template. It delegates by using an idea found in | 53 | the main template. It delegates by using an idea found in |
54 | <a href="https://github.com/zimbatm/shab">shab</a>: | 54 | <a href="https://github.com/zimbatm/shab">shab</a>: |
55 | each input file is read as a `heredoc`, which enables | 55 | each input file is read as a `heredoc`, which enables |
@@ -69,14 +69,14 @@ Content goes into the following (hard-coded) directories: | |||
69 | website, ready for <code>rsync</code>ing to a server.</li> | 69 | website, ready for <code>rsync</code>ing to a server.</li> |
70 | </ul> | 70 | </ul> |
71 | 71 | ||
72 | If there is no __TM__ in the directory where __UNK__ is run, | 72 | If there is no __L__ in the directory where __UNK__ is run, |
73 | one will be created that will simply `cat` the file being processed. | 73 | one will be created that will simply `cat` the file being processed. |
74 | 74 | ||
75 | The following variable is made available to __TM__: | 75 | The following variable is made available to __L__: |
76 | 76 | ||
77 | <ul> | 77 | <ul> |
78 | <li><strong>F</strong>: the <em>File</em> name passed to | 78 | <li><strong>F</strong>: the <em>File</em> name passed to |
79 | <strong>TM</strong></li> | 79 | <strong>L</strong></li> |
80 | <li><strong>N</strong>: the <em>fileName</em> | 80 | <li><strong>N</strong>: the <em>fileName</em> |
81 | (with directories removed) of the file being processed</li> | 81 | (with directories removed) of the file being processed</li> |
82 | </ul> | 82 | </ul> |
@@ -89,7 +89,7 @@ as well as these functions: | |||
89 | It is much simpler than <code>shab</code>, | 89 | It is much simpler than <code>shab</code>, |
90 | and will fail if the template | 90 | and will fail if the template |
91 | (or if it nests templates, one of the nested ones) | 91 | (or if it nests templates, one of the nested ones) |
92 | has a <code>ZZ</code> on a line by itself, | 92 | has a <code>^D</code> on a line by itself, |
93 | due to its <code>heredoc</code> nature.</li> | 93 | due to its <code>heredoc</code> nature.</li> |
94 | <li><strong>T</strong>, for <em>Title</em>: | 94 | <li><strong>T</strong>, for <em>Title</em>: |
95 | it'll return the first line of the current file.</li> | 95 | it'll return the first line of the current file.</li> |
@@ -107,7 +107,7 @@ in the script, but they can be used in templates): | |||
107 | </ul> | 107 | </ul> |
108 | 108 | ||
109 | As mentioned above, templates can be nested. | 109 | As mentioned above, templates can be nested. |
110 | Simply call another template from __TM__ with the __X__ function. | 110 | Simply call another template from __L__ with the __X__ function. |
111 | 111 | ||
112 | <h2>lht</h2> | 112 | <h2>lht</h2> |
113 | 113 | ||