Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autogenerate man page #35

Merged
merged 3 commits into from
May 21, 2024
Merged

Autogenerate man page #35

merged 3 commits into from
May 21, 2024

Conversation

keszybz
Copy link
Member

@keszybz keszybz commented May 21, 2024

No description provided.

Also, change help to use capitalized sentences. argparse
unfortunately doesn't make this easy, we need to readd the
--help option manually with the correct description.
Setting this up is a bit annoying, but then with luck we won't
have to edit raw roff when new options are added.
@bluca bluca merged commit 31ce2fc into systemd:main May 21, 2024
1 check passed
@bluca
Copy link
Member

bluca commented May 21, 2024

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
Copy link
Member

bluca commented May 21, 2024

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 keszybz deleted the autogenerate-man-page branch May 21, 2024 18:55
@keszybz
Copy link
Member Author

keszybz commented May 21, 2024

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
Copy link
Member

bluca commented May 21, 2024

@bluca
Copy link
Member

bluca commented May 21, 2024

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
Copy link
Member Author

keszybz commented May 22, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants