ARGPARSE-MANPAGE(1)

πŸ“¦ version 4.6, in opensuse-leap 16.0

πŸ¦‹ ARGPARSE-MANPAGE(1) β€” the argparse-manpage glow-up ✨

okay so bestie, welcome to argparse-manpage, section 1 of the Generated Python Manual. this is the page that literally builds man pages out of Python's argparse.ArgumentParser object, no cap. it's giving "I write my docs once and the man page just appears" energy πŸ’…


🌸 SYNOPSIS 🌸

argparse-manpage [-h] (--module MODULE | --pyfile PYFILE) (--function
FUNCTION | --object OBJECT) [--project-name PROJECT_NAME] [--prog PROG]
[--version VERSION] [--description TEXT] [--author [AUTHOR]] [--url URL]
[--format {pretty,single-commands-section}] [--output OUTFILE]
[--manual-section MANUAL_SECTION] [--manual-title MANUAL_TITLE]
[--include FILE] [--manfile FILE]

like, yes, that's a lot of brackets. it's fine. those are choices she's giving you πŸŽ€


πŸ’– DESCRIPTION πŸ’–

Build a manual page from Python's argparse.ArgumentParser object. that's it, that's the whole vibe. your parser already knows all the flags β€” she just needs a little help getting dressed for the man page format πŸ’…βœ¨


πŸ‘‘ OPTIONS πŸ‘‘

  • --module MODULE β€” search for the OBJECT/FUNCTION inside MODULE. πŸ”
  • --pyfile PYFILE β€” search for the OBJECT/FUNCTION inside FILE instead. same energy, different door. πŸšͺ
  • --function FUNCTION β€” call FUNCTION from MODULE/FILE to obtain the ArgumentParser object. she does the work, you get the parser 🫢
  • --object OBJECT β€” obtain the ArgumentParser OBJECT from FUNCTION (yes, to get the argparse object) from MODULE or FILE. iykyk πŸ”₯
  • --project-name PROJECT_NAME β€” the name of the project that the documented program is part of. give her some family, she deserves it πŸ’–
  • --prog PROG β€” substitutes %prog in ArgumentParser's usage. iconic substitution moment ✨
  • --version VERSION β€” the version of the program β€” this one will be visible in the manual page footer. main character placement fr 🌟
  • --description TEXT β€” a description of the program, used in the NAME section, right after the leading 'name - ' part. check out man (7) man-pages for more info πŸ“–
  • --author [AUTHOR] β€” author of the program. can be specified multiple times β€” collect them like stickers πŸŽ€
  • --url URL β€” a link to the project's homepage. link her up πŸ”—
  • --format {pretty,single-commands-section} β€” the format of the generated man page. defaults to 'pretty'. two options, both slay, pick your fighter πŸ’…
  • --output OUTFILE β€” the output file. defaults to stdout. no file? she'll just scream it into your terminal, respectfully 😭
  • --manual-section MANUAL_SECTION β€” the section of the manual, 1 by default. peep man (7) man-pages for more info about which sections exist πŸ“š
  • --manual-title MANUAL_TITLE β€” the title of the manual, "Generated Python Manual" by default. see man (7) man-pages for more instructions 🏷️
  • --include FILE β€” a file that contains extra material for the man page. bonus content, we love her πŸ“
  • --manfile FILE β€” a file containing a complete man page. the whole thing, ready to go πŸ‘‘

🧚 AUTHOR 🧚

Gabriele Giammatteo <gabriele.giammatteo@eng.it> β€” the icon, the legend, the reason this page exists πŸ’œ


🌈 DISTRIBUTION 🌈

the latest version of argparse-manpage may be downloaded from https://github.com/praiskup/argparse-manpage β€” go get her, she's fresh πŸ¦‹


ok bestie real talk for a sec: --output defaults to stdout, so if you forget to give her a file she'll just dump the whole page right there in your terminal. not a bug, just ✨a choice✨ you made πŸ™ˆ

and that's the tea, bestie πŸŽ€ this was argparse-manpage version 4.6, dated 2025-04-01 β€” go forth and generate man pages that are, honestly, prettier than mine πŸ’–βœ¨πŸŒΈπŸ«Ά

πŸ“¦ where this page comes from