Add man page output for the frontends#1004
Conversation
Register the man page reference feature from SabreTools.CommandLine in MPF.CLI and MPF.Check so that "MPF.CLI man" and "MPF.Check man" write a roff man page built from the same command model as the help output. The page is emitted before any configuration handling so the roff stays clean for redirection to a file. Add a hand-maintained man page for the graphical frontend, which has no command-line model to generate from. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…tion # Conflicts: # CHANGELIST.md
|
Verified against the published 1.5.0: the full target-framework sweep builds clean with no warnings, both pages generate with no side effects (no I dropped the open questions from the description and made the calls, so there is nothing to decide before merging; each is a one-line change if you want it different. Generated with Claude Opus 4.8. |
…tion # Conflicts: # CHANGELIST.md
…tion # Conflicts: # CHANGELIST.md
|
Merged master in (twice — it moved while I was working), no rebase, so your view of the diff still lines up. Only Your Re-verified after the merge, on a machine with no configuration: both pages generate clean ( Generated with Claude Opus 4.8. |
…tion # Conflicts: # CHANGELIST.md
Summary
MPF.CLI manandMPF.Check manwrite a roff man page to standard output, rendered from the same command model that produces--help. Packagers currently hand-write these pages and re-sync them on every release; this removes that drift at the source.This wires up the man page feature added to
SabreTools.CommandLine(SabreTools/SabreTools.CommandLine#2). That release is out — 1.5.0 on nuget.org — and master already references it, so the draft note about the pin no longer applies and this is ready for review.What it does
MPF.CLI manandMPF.Check manrender a page from the existing feature/input model. No new plumbing:manis just another reference feature, likeHelp.MPF.Avalonia/MPF.1) is included for it.A packager then does:
Two intentional details:
Configuration path:line. Generating it has no side effects: it never writesconfig.jsonand never runs first-run setup..THdate is left blank so a distributor stamps it at build time, keeping output reproducible. This is the only thingmandoc -T lintflags until it is stamped.Installing the pages is left to distributors; this PR only adds the ability to produce them.
Verification
Against the published
SabreTools.CommandLine1.5.0, on this branch with master merged in:TreatWarningsAsErrors, 0 warnings.config.json— and none is created, neither there nor under~/.config/mpf.groff -man -ww -zreports no warnings for all three pages.mandoc -T lintis clean except the intended missing-date warning.listpath, for one) with no change here, which is the point of generating rather than hand-writing it.Choices made
Names in
.TH/NAMEfollow the assembly names (MPF.CLI,MPF.Check,MPF), matching what is invoked; the GUI page sits next to its project; option descriptions use the verbose form so the page is self-contained. Each is a one-line change if you would rather have it otherwise.Prepared with AI assistance (Claude Opus 4.8) and reviewed before submission.