checking in some WIP

* added some netx funcs
* added netx/dnsx
* currently updating docs and adding *x funcs to sprigx
This commit is contained in:
brent saner
2026-02-24 17:41:57 -05:00
parent 4770052b52
commit c6fc692f5e
14 changed files with 2773 additions and 646 deletions

View File

@@ -15,23 +15,59 @@ for f in $(find . -type f -iname "README.adoc"); do
nosuffix="${filename%.*}"
pfx="${docsdir}/${nosuffix}"
# Render HTML, include in commit
newf="${pfx}.html"
asciidoctor -a ROOTDIR="${orig}/" -o "${newf}" "${f}"
echo "Generated ${newf} from ${f}"
git add "${newf}"
# If asciidoctor-pdf is installed, render as PDF for local use
# (Does not get added to commit, and *.pdf is in .gitignore for a reason)
if command -v asciidoctor-pdf &> /dev/null;
then
newf="${pfx}.pdf"
asciidoctor-pdf -a ROOTDIR="${orig}/" -o "${newf}" "${f}"
fi
# If pandoc is installed, render to "GitHub-flavored Markdown" for better rendering on forks/mirrors
# and marginally better rendering on https://pkg.go.dev/ and add to commit.
#
# <rant>
# There is no such thing as "Markdown".
# The closest thing you have to any sort of standard is https://daringfireball.net/projects/markdown/
# but everybody and their mother adds their own "extensions"/"flavor", and sometimes even
# change how formatting works compared to the Daring Fireball/John Gruber spec (the original creator of the "syntax").
# Ergo "Markdown" inherently has no meaning.
# It's one of the worst formatting languages out there - just because it's popular doesn't mean it's good.
#
# If you're writing docs, you should stick to one of these which have defined, canonical, standardized
# syntax:
# * AsciiDoc/AsciiDoctor
# * Supports much more extensive formatting than any Markdown flavor I've seen
# * Source/raw/unrendered still *quite* readable by human eyes
# * Somewhat limited parsers/renderers
# * https://asciidoc.org/
# * https://asciidoctor.org/
# * DocBook
# * Supports even more extensive and flexible but exact formatting
# * Great for publishing, though - especially if you need control over formatting/layout
# * XML-based
# * Harder to read in plaintext, but fairly doable (XML lends to decent mental rendering)
# * Very wide support for parsing/rendering
# * https://docbook.org/
# * LaTex
# * Allows for *very* extensive domain-specific ligature/representation (very common in mathematic/scientific literature)
# * But nigh unreadable by human eyes unless you've rather familiar with it
# * Parsing/rendering support about on-par with DocBook
# * https://www.latex-project.org/
# </rant>
if command -v pandoc &> /dev/null;
then
newf="${pfx}.md"
set +e
#asciidoctor -a ROOTDIR="${orig}/" -b docbook -o - "${f}" | pandoc -f docbook -t markdown_strict -o "${newf}"
#asciidoctor -a ROOTDIR="${orig}/" -b html -o - "${f}" | pandoc -f html -t markdown_strict -o "${newf}"
asciidoctor -a ROOTDIR="${orig}/" -b html -o - "${f}" | pandoc -f html -t gfm -o "${newf}"
if [ $? -eq 0 ];
then