praiskup / argparse-manpage

Automatically build man-pages for your Python project
Apache License 2.0
40 stars 22 forks source link

--version has no effect #62

Closed tvendelin closed 1 year ago

tvendelin commented 1 year ago

Given

$ argparse-manpage -h

 <--- snip -->
  --version VERSION     Version of the program.
 <--- snip -->

I expect to get the version into the generated man page. However, when running

$ argparse-manpage --pyfile src/mymodule/__init__.py --function get_argparser --version "0.1.0" > ohoo.1

I get

$ cat ohoo.1
.TH OHOO "1" Manual
.SH NAME
ohoo
.SH SYNOPSIS
.B ohoo
[-h] [--foo FOO]
.SH DESCRIPTION
    Prints "Ohoo!"

.SH OPTIONS
.TP
\fB\-\-foo\fR \fI\,FOO\/\fR
no effect

i.e., the version doesn't make it to the man page.

praiskup commented 1 year ago

Thank you for the report!