💾 Archived View for rawtext.club › ~zilog › 2024-02-08-znews.txt captured on 2024-03-21 at 16:58:36.

View Raw

More Information

-=-=-=-=-=-=-

Thu 08 Feb 2024 10:32:07 PM UTC

Was re-reading 'man rawtext.club' and noticed that somebody started
implementing a RTC Wiki, really more of an intranet, with the intention
of automatically pulling from ~/.wiki/ assuming it's readable.  Typing
'wiki' provides the current state of development, basically stalled.
A perusal of existing user ~/.wiki/ directories shows only a handful have
any content, mostly an index.html and one or two extras.  One person has
their index done in markdown (index.md). Anyway I thought it's be fun
to try to write a simple wiki index browser using Awk and the lynx(1)
text web browser:

 --
 $ ~zilog/public_bin/wikiview -h

 wikiview browses the RTC user wiki; the following index
 file types are supported: .htm, .html, .xhtml, .md *

 * requires the following addition to '~/.mailcap':
  'text/markdown; Markdown.pl %s |lynx -dump -stdin |less'
 --

The script is fairly small, 32 lines of code plus some comments, and
although it's calling Gawk it doesn't make use of any of its non-POSIX
extensions*.  Mawk would run a bit faster and perhaps I'll request it be
installed at some point.


  could not find a clean way to eliminate warning messages whenever
  a non-readable ~/.wiki/ was encountered.  It may be possible using
  Gawk's BEGINFILE{} construct or perhaps the functionality in the
  readfile(3am) and/or filefuncs(3am) libraries.