Add support for man pages to CLI tools #3468
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of Change(s)
This PR adds support for adding man pages to the command line utilities.
I could automatically look for a matching man page rather than requiring it be mandated, but I wanted to leave the option for having the manpage be in a different location if needed.
As a sample, I've translated just usdcat over from https://openusd.org/release/toolset.html to a manpage. If this PR is accepted, I think the community or I could fill out the rest fairly quickly. I just didn't want to overload this one PR with everything at once.
It is possible to use pandoc to generate both the manpage and the sphinx doc, but I wanted to keep this PR small.
While Windows does not technically use manpages, there are various systems on windows that allow accessing them, so I haven't gated these behind a platform check.
To preview the rendering, you can simply
man usdcat.1
. The1
suffix is used for command line tools.Checklist
[X] I have created this PR based on the dev branch
[X] I have followed the coding conventions
[ ] I have added unit tests that exercise this functionality (Reference:
testing guidelines)
[X] I have verified that all unit tests pass with the proposed changes
[X] I have submitted a signed Contributor License Agreement (Reference:
Contributor License Agreement instructions)