systemd / package-notes

Tools to add packaging metadata to ELF files
16 stars 10 forks source link

Autogenerate man page #35

Closed keszybz closed 4 months ago

bluca commented 4 months ago
make dlopen-notes.1
argparse-manpage    \
    --output=dlopen-notes.1     \
    --pyfile=dlopen-notes.py    \
    --function=make_parser \
    --project-name=package-notes \
    --include=docs/dlopen-description.man
usage: argparse-manpage [-h] (--module MODULE | --pyfile PYFILE) (--function FUNCTION | --object OBJECT)
                        [--author AUTHOR] [--author-email AUTHOR_EMAIL] [--project-name NAME] [--url URL]
                        [--output OUTFILE]
argparse-manpage: error: unrecognized arguments: --include=docs/dlopen-description.man
make: *** [Makefile:4: dlopen-notes.1] Error 
bluca commented 4 months ago

Dropping that parameter I get:

argparse-manpage(1)                           General Commands Manual                           argparse-manpage(1)

NAME
       argparse-manpage

SYNOPSIS
       argparse-manpage [-r] [-s] [-f [FEATURE1,FEATURE2]] [-h] filename [filename ...]

DESCRIPTION
       Read .note.dlopen notes from ELF files and report the contents.

OPTIONS
       filename
              Library file to extract notes from

       -r, --raw
              Show the original JSON extracted from input files

       -s, --sonames
              List all sonames and their priorities, one soname per line

       -f [FEATURE1,FEATURE2], --features [FEATURE1,FEATURE2]
              Describe features, can be specified multiple times

AUTHORS
       package-notes was written by <<UNSET --author OPTION>> <<<UNSET --author_email OPTION>>>.

DISTRIBUTION
       The latest version of package-notes may be downloaded from ⟨<<UNSET⟩
keszybz commented 4 months ago

Hmm, maybe you have an old version of argparse-manpage? But the list at https://github.com/praiskup/argparse-manpage/ says Debian 12 has 4.5, same as here.

bluca commented 4 months ago

Nope, debian stable has 1.2.2 https://packages.debian.org/search?keywords=argparse-manpage&searchon=names&suite=all&section=all

bluca commented 4 months ago

Just generate it once with that tool and check the result in? I can't imagine we are going to change this that often...

keszybz commented 3 months ago

Whatever is easier. I think both options have merit ;)