From: Wayne Davison Date: Tue, 9 Jun 2020 22:21:38 +0000 (-0700) Subject: More man processing improvements X-Git-Tag: v3.2.0pre1~43 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=03fc62ad2fcc065bcbe67ad4968b331f52189e26;p=thirdparty%2Frsync.git More man processing improvements - Support the commonmark library in addition to cmarkgfm. - Remove github-flavor from the markup. - A few more html style improvements. --- diff --git a/NEWS.md b/NEWS.md index 783064ab..837775ef 100644 --- a/NEWS.md +++ b/NEWS.md @@ -126,6 +126,10 @@ Protocol: 31 (unchanged) - Silenced some annoying warnings about major()|minor() due to the autoconf include-file check not being smart enough. + - Converted the man pages from yodl to markdown. They are now processed via a + simple python3 script using the cmarkgfm OR commonmark library. This should + make it easier for packaging rsync, since yodl has gotten obscure. + - Improved some configure checks to work better with strict C99 compilers. - The `--debug=FOO` options are no longer auto-forwarded to the server side, diff --git a/md2man b/md2man index 2c92fbe2..57840103 100755 --- a/md2man +++ b/md2man @@ -1,15 +1,15 @@ #!/usr/bin/python3 -# This script takes a manpage written in github-flavored markdown and turns it -# into a html web page and a nroff man page. The input file must have the name -# of the program and the section in the format: NAME.NUM.md. The output files -# are written into the current directory named NAME.NUM.html and NAME.NUM. The -# input format has one extra extension: if a numbered list starts at 0, it is -# turned into a description list. The dl's dt tag is taken from the contents of -# the first tag inside the li, which is usually a p tag or a code tag. The -# cmarkgfm lib is used to transforms the input file into html. The html.parser -# is used as a state machine that both tweaks the html and outputs the nroff -# data based on the html tags. +# This script takes a manpage written in markdown and turns it into an html web +# page and a nroff man page. The input file must have the name of the program +# and the section in this format: NAME.NUM.md. The output files are written +# into the current directory named NAME.NUM.html and NAME.NUM. The input +# format has one extra extension: if a numbered list starts at 0, it is turned +# into a description list. The dl's dt tag is taken from the contents of the +# first tag inside the li, which is usually a p, code, or strong tag. The +# cmarkgfm or commonmark lib is used to transforms the input file into html. +# The html.parser is used as a state machine that both tweaks the html and +# outputs the nroff data based on the html tags. # # Copyright (C) 2020 Wayne Davison # @@ -23,16 +23,26 @@ CONSUMES_TXT = set('h1 h2 p li pre'.split()) HTML_START = """\ %s - +