Subject: [Rfc-markdown] kdwatch (Re: [Tools-discuss] Let's have better tools)

From: Carsten Bormann <[email-masked]>
Date: Sat, 3 Jul 2021 20:50:15 +0200

On 27. Jun 2021, at 22:15, Carsten Bormann <[email-masked]> wrote:
> 
>> Or you could run a text-editor and web browser side-by-side and use
>> rfc2629.xslt's "live HTML refresh" feature (see
>> <https://greenbytes.de/tech/webdav/rfc2629xslt/rfc2629xslt.html#html.live.refresh>).
> 
> Doing something like this server-based (server runs on your laptop) is a SMOP (small matter of programming), and I’m already using that for other kinds of markdown.
> Coming to an I-D/RFC markdown processor of your choice […]

It is that time in the year again, so we need all the help we can get.

For the pioneers among us:

Do once:
$ pip3 install --upgrade xml2rfc   [in a pinch, kdrfc will use the IETF web service]
$ gem update
$ gem install kdwatch
(For some reason, this takes a couple minutes, during the first few of which it may seem nothing happens.)

Do for each use:
Open a separate terminal window/screen.
In a directory that has a single draft-*.md (or select one by specifying the markdown file name on the command line):

$ kdwatch

(There can only be one kdwatch active on each host at the moment; the port numbers aren’t actively managed yet.)

After about 10 seconds, a browser will open (or an error message will pop up with the URL to use, which currently always is http://127.0.0.1:7991/).

Now, whenever you do an editor save, after a couple seconds (1.6 s for my Intel Mac, 0.8 s for my M1 Mac) you see an updated HTML in the browser.

You need to keep the kdwatch terminal/screen open to see potential error messages.

This has only been tested on macOS, but *should* work on Linux.  No idea about WSL.
There is very little error handling yet, so restarts of the tool may be required, or sometimes reloading in the browser (CMD-R/F5) is all that is needed.

The fun thing is that you can fill in the hostname of the laptop and use the URL on a different browser (e.g., http://mymac.local:7991 on your iPad or another laptop), and save some screen real-estate.
(I’m assuming you are not “on the Internet” here… But maybe this even can be used for joint viewing :-)

If you try it, please send feedback (and, in case of an error, *all* output on the kdwatch terminal window, please).

Grüße, Carsten

---

From: Carsten Bormann <[email-masked]>
Date: Sun, 4 Jul 2021 15:23:42 +0200

> $ kdwatch

Now with README:

https://github.com/cabo/kdwatch/blob/main/README.md

Grüße, Carsten