diff options
author | Case Duckworth | 2024-02-06 00:11:35 -0600 |
---|---|---|
committer | Case Duckworth | 2024-02-06 00:11:35 -0600 |
commit | 1173feb81faca9704dae1fda68b89eb46a8cd549 (patch) | |
tree | 8870b46088f796ed38d4475f36e6121eedea55f8 | |
parent | rename st.sh to html.st.sh (diff) | |
download | subtext-1173feb81faca9704dae1fda68b89eb46a8cd549.tar.gz subtext-1173feb81faca9704dae1fda68b89eb46a8cd549.zip |
Add license, makefile, etc
-rw-r--r-- | COPYING | 26 | ||||
-rw-r--r-- | Makefile | 7 | ||||
-rw-r--r-- | combine.ed | 12 |
3 files changed, 45 insertions, 0 deletions
diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..2e90147 --- /dev/null +++ b/COPYING | |||
@@ -0,0 +1,26 @@ | |||
1 | Copyright (c) Case Duckworth | ||
2 | |||
3 | Redistribution and use in source and binary forms, with or without | ||
4 | modification, are permitted provided that the following conditions are met: | ||
5 | |||
6 | 1. Redistributions of source code must retain the above copyright notice, this | ||
7 | list of conditions and the following disclaimer. | ||
8 | |||
9 | 2. Redistributions in binary form must reproduce the above copyright notice, | ||
10 | this list of conditions and the following disclaimer in the documentation | ||
11 | and/or other materials provided with the distribution. | ||
12 | |||
13 | 3. Neither the name of the copyright holder nor the names of its | ||
14 | contributors may be used to endorse or promote products derived from | ||
15 | this software without specific prior written permission. | ||
16 | |||
17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
18 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
19 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
20 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | ||
21 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
22 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
23 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
24 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
25 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
26 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..d0bab7b --- /dev/null +++ b/Makefile | |||
@@ -0,0 +1,7 @@ | |||
1 | # subtext | ||
2 | |||
3 | subtext: subtext.sh subtext.awk | ||
4 | ed subtext.sh < combine.ed > $@ | ||
5 | |||
6 | readme.html: | ||
7 | ./subtext.sh -m html -o $@ readme.st | ||
diff --git a/combine.ed b/combine.ed new file mode 100644 index 0000000..a3d519b --- /dev/null +++ b/combine.ed | |||
@@ -0,0 +1,12 @@ | |||
1 | /stawk() | ||
2 | +c | ||
3 | subtext="$(cat<<'__END_SUBTEXT__' | ||
4 | . | ||
5 | .r subtext.awk | ||
6 | a | ||
7 | __END_SUBTEXT__ | ||
8 | )" | ||
9 | awk "$subtext" "$@" | ||
10 | . | ||
11 | w /dev/stdout | ||
12 | q \ No newline at end of file | ||