From 3385310a5ddd849eecb507821ae6ce95bb51de9b Mon Sep 17 00:00:00 2001 From: Aleteoryx Date: Fri, 15 Aug 2025 01:09:40 -0400 Subject: [PATCH] make it all presentable --- COPYING | 13 +++++++++++++ README.md | 38 ++++++++++++++++++++++++++++++++++++++ gloss.py | 2 +- testout/a.html | 4 ++-- testsrc/a.gls | 2 +- 5 files changed, 55 insertions(+), 4 deletions(-) create mode 100644 COPYING create mode 100644 README.md diff --git a/COPYING b/COPYING new file mode 100644 index 0000000000000000000000000000000000000000..b8ca881d06291d9bdc1abcee2738aa1d783ac8a4 --- /dev/null +++ b/COPYING @@ -0,0 +1,13 @@ +Copyright (C) 2025 by Aleteoryx + +Permission to use, copy, modify, and/or distribute this software for +any purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL +WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR +BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES +OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000000000000000000000000000000000000..e1b59890a756d0f30935efc2aa148e689ed6a105 --- /dev/null +++ b/README.md @@ -0,0 +1,38 @@ +# gloss + +a glossary-style wiki program. with a formatting language like markdown but worse. + +it is designed to maximize nonlinear browsing. + +*** + +the central gloss.py script translates each .gls file in its input directory to a .html in its output. + +.gls files are composed of a names section, a set of blocks, and an optional "see also" section. + +the names section consists of the first non-empty non-comment lines in a file. +each line becomes a name for the file. +a file's names are automatically turned into links, +the first time it is referenced in another document. +matching is performed at word boundaries: a file with name "foo" will not be linked from "foobar". +the names section is terminated with a blank line. + +blocks can be either paragraph blocks or quote blocks, and they are terminated by blank lines. +a block is a quote block if its first line begins with a '>'. +to begin a paragraph block with '>', escape it with a backslash. + +if any line in a block begins with ~, it will become the block's metadata. +only quotes have metadata, for authorship info. +the format is thus: ` @@