My Setup (Living the Dream) --------------------------- I'm writing this phlog entry in Vim. It's in a wiki structure "managed" by my new AsciiDoc-flavored Vim wiki called VViki. This file has the filename ~/wiki/gopher-zaibatsu/phlog/2020-02-23-my-setup.adoc. To edit it, I opened my wiki with the (VimWiki-inspired) Vim shortcut ww, navigated to a link titled `gopher-zaibatsu`, and pressed Enter to open the Zaibatsu phlog gophermap. In the gophermap wiki page, I typed a new page name for this entry. Pressing Enter on it turned it into an AsciiDoc link (link "macro" in AsciiDoc terminology). Pressing Enter again on the new link opened the new page for editing and here we are! When I'm done writing this, it will be converted into formatted plaintext suitable for Gopher with an Awk script I just finished this morning (called adoc2gopher). The phlog gophermap will also be converted from the gophermap.adoc wiki page with the same script (adding a '-m' command-line option to produce gopher menu-style links). The Road to Get Here ================================================================= So this has been a several-year-long journey. And while it's not over yet, I've certainly made some serious progress. AsciiDoc -------- I decided a while back that this was the One True format for me. It has the semantic abilities of DocBook (an XML format for the authoring of technical documention), but the readability of a lightweight text format like Markdown. VViki ----- I worked on adding AsciiDoc syntax to VimWiki for a bit. But that's a pretty big plugin and the syntax support is deeply entwined in its features. So I wrote my own. The result is VViki and now that's done and over and I can stopping wringing my hands trying to justify creating my own plugin instead of working on the existing one because it's done now and there's nothing anybody can do about it. This took me deep, deep into vimscript territory and I came out with _most_ of my sanity intact. He he ha ha ho ho. [1] https://github.com/ratfactor/vviki adoc2gopher.awk --------------- My previous Gopher content generator was called Text Junior (`tjr`), which took an ultra-light line-based formatting syntax as input and spit out groff/troff code that produced formatted text. It was written in Perl. My AsciiDoc converter is written in Awk and this example demonstrates a complete document with all features: = Title A paragraph of text is reflowed as needed. == Heading level 1 A verbatim block for ASCII art and such: ---- _ _ _ | |__ ___| | | ___ | '_ \ / _ \ | |/ _ \ | | | | __/ | | (_) | |_| |_|\___|_|_|\___/ ---- === Heading level 2 The link types supported: link:foobar/gophermap[link to a gopher menu] link:bizbaz[link to gopher content] link:gopher://gopher.club/1/users/ratfactor/[link to external gopher menu] link:gopher://gopher.club/0/users/ratfactor/phlog/2020-02-04-back-again[link to external gopher content] **** An indented block (or "callout" block in AsciiDoc) terminology. This will be indented and reflowed. **** Linking in Gopher is _easily_ the most annoying thing about the protocol/format (second being the fixed-width content that doesn't scale to small screens). My AsciiDoc converter understands the types of gophermap menu links recognized by most Gopher servers and produces them from the equivalent AsciiDoc link syntax. Those same links can also be exported in the "citation" style (with the little [1] numbers) popular with the cool phloggers. :-) The Dream ================================================================= I've still got some manual processes in this. But most of them are low-hanging fruit. I can bang out the scripts as soon as I get annoyed enough. Ultimately, this system is going to also power my website (which is already written in AsciiDoc). I've also converted my command-line help system (named 'um' after a similar utility posted to Hacker News a while back) to use the new wiki. Wiki all the things!!! I'm sort of overflowing with ideas for this system and I look forward to exploring how much more it can do. Until next time, keep it dark and dirty, rodents!