-
Notifications
You must be signed in to change notification settings - Fork 111
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
Feature/manpage #596
Feature/manpage #596
Conversation
cd0a1bd
to
1db637f
Compare
Maybe we can use cargo-deb to make a deb package in the github workflow. |
Speaking as the current maintainer of the Fedora and EPEL packages, if the build process generates a man page then that’s all I need. I can easily install it. |
1db637f
to
e6877f7
Compare
@musicinmybrain Excellent, that's what I was hoping. |
4860718
to
321e771
Compare
This is beautiful, great work! For reference, here's an excerpt of the rendered page: It was faster for me to push two extra small changes than explaining them on a PR review, but the summary of what I did is as follows:
|
This is much less fragile than messing with `OUT_DIR`, whose location relative to the `target` directory is purposefully underspecified.
This is done by extracting such a constant to a separate module file, outside of `StripChunks`.
969e4b0
to
3ce88eb
Compare
Awesome, thanks @AlexTMjugador, your changes look great! What do you think about changing the workflow to use cargo-deb for the linux builds? |
I think that's a good and doable idea. We can begin distributing the generated .deb ourselves too, so even if we don't make it to the official Debian repositories anytime soon, people can still manage their OxiPNG install with the APT package manager. |
This PR adds a build script to generate a man page using clap_mangen, as per this example:
https://github.com/sondr3/clap-man-example/blob/main/build.rs
I'm not sure what to actually do with the man file from here, I guess it's up to the packaging process to do something with it?
See #69 (comment)
Note I couldn't see a way to include the
DISPLAY
chunk names from the constant as we did before. They're now just hardcoded into the help and will require manually updating if the list changes.Closes #526