From d90990d6acbfb592d3c989e423db4768b8c46d74 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Tue, 16 Jun 2020 14:42:41 -0700 Subject: [PATCH] A few more trivial tweaks. --- md2man | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/md2man b/md2man index 38c61f24..a459e36c 100755 --- a/md2man +++ b/md2man @@ -89,8 +89,7 @@ def main(): env_subs['VERSION'] = '1.0.0' env_subs['libdir'] = '/usr' else: - chk_files = 'NEWS.md Makefile'.split() - for fn in chk_files: + for fn in 'NEWS.md Makefile'.split(): try: st = os.lstat(fi.srcdir + fn) except: @@ -112,16 +111,16 @@ def main(): if var == 'VERSION': break - fi.date = time.strftime('%d %b %Y', time.localtime(fi.mtime)) - with open(fi.fn, 'r', encoding='utf-8') as fh: txt = fh.read() txt = re.sub(r'@VERSION@', env_subs['VERSION'], txt) txt = re.sub(r'@LIBDIR@', env_subs['libdir'], txt) + fi.html_in = md_parser(txt) txt = None + fi.date = time.strftime('%d %b %Y', time.localtime(fi.mtime)) fi.man_headings = (fi.prog, fi.sect, fi.date, fi.prog + ' ' + env_subs['VERSION']) HtmlToManPage(fi) -- 2.47.2