FTR: scripts for markdown slingers
John Rose
john.r.rose at oracle.com
Tue Jun 20 07:55:36 UTC 2017
(This is not exactly a discussion of webrev, but of tools for
working with differences in documentation. The third script might
make a good plugin for webrev, for markdown sources, though
most uses of webrev don't deal with markdown. My apologies in
advance for the tangency.)
In the course of using markdown (via pandoc) for managing
various kinds of documentation, I have created some nifty
scripts that others might find useful. They are wrappers
around pandoc and (in one case) wdiff. Also specdiff.
This one simply converts HTML files to markdown files, applying
some pandoc workarounds and my favorite pandoc options:
http://cr.openjdk.java.net/~jrose/scripts/html-to-markdown.sh.txt
This one downloads a public copy of the standard JVMS and/or JLS
specifications (for Java 8) and converts the HTML to markdown,
setting up the possibility of editing the specs in markdown form.
http://cr.openjdk.java.net/~jrose/scripts/examine-java-specs-as-markdown.sh.txt
And this one will run a "diff -u" between two markdown files and
massage the difference report into reasonably decent markdown:
http://cr.openjdk.java.net/~jrose/scripts/udiff-markdown.sh.txt
There are comments in this script on how to use it via a Mercurial
command that extends "hg diff".
Sadly, since HTML doesn't support change bars, neither does
this script; it's all about those diff hunks.
These are provided as-is, with no promise that they will do anything
useful to you. I hope you enjoy them.
— John
More information about the webrev-dev
mailing list