m15o.net/site/doc/xtx

NAME

xtx - plain-text format

xtx, short for Nightfall Express Text, is a plain-text, non-hypertext markup language.

Like Gemtext, which it is inspired from, xtx is a line-oriented format.

A document consists of one or more lines. Like Gemtext:

Unlike Gemtext:

EXAMPLES

Convert xtx to HTML:

#!/bin/awk -f

mode == "pre" && !/^  / {
	mode = ""
	printf "</pre>"
}

mode == "list" && !/^\* / {
	mode = ""
	print "</ul>"
}

/^# /   { printf "<h1>%s</h1>", substr($0, 2); next }
/^## /  { printf "<h2>%s</h2>", substr($0, 3); next }
/^### / { printf "<h3>%s</h3>", substr($0, 4); next }
/^> /   { printf"<blockquote>%s</blockquote>", substr($0, 2); next }
/^  /   { if (mode != "pre") {
            printf "<pre>"
            mode = "pre"
          } else {
            print ""
          }
          printf substr($0, 3)
          next
        }
NF != 0 { printf "<p>%s</p>", $0 }

SEE ALSO

xtw(doc)

https://nightfall.city/nex/in/m15o/projects/text.xtw

REF

xtw(doc)