-
-
Notifications
You must be signed in to change notification settings - Fork 94
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
Add man page #419
Add man page #419
Conversation
With the inclusion of himalaya to various Linux distributions we should fulfill the requirement of having a manual page for each executable. I chose to write the man page in markdown for easier editing. It can then be transformed into a regular man page via pandoc: `pandoc --standalone --to man himalaya.1.md -o himalaya.1`
Nix build fail seems unrelated to my changes. |
Thank you for your initiative, I find it really pertinent. The only drawback I see is that you need to maintain this file manually, it could be nice if it could be auto generated by |
Oh, that's sad (and cool too) :D I see that would make it easier to keep the options/command descriptions up to date. Also https://github.com/clap-rs/clap/issues?q=is%3Aopen+is%3Aissue+label%3AA-man looks like there are still some problems with it that might be relevant to us. Did you try it out yet and see if it can handle all the cases and what it looks like? Personally I would suggest to merge this PR and switch to |
Next week I will give the |
Sounds good! |
I will take care of it straight after #433! |
The generated man is really close to yours, I think we can keep EDIT: you can try |
Great! So the next release will contain the man page yes? |
It will contain the
I still don't know how and when to generate this file? I don't want to commit the generated file (like completions files). Let's say you install himalaya on Debian, should the Debian installer have the responsibility to generate the man file (like the completions files)? |
Back in the day most C projects had a Another way could be that in your commit Third option would be to mention in some documentation that downstream projects need to run certain commands to generate those files. |
Thank you for the details. Actually, releases are built by a GitHub action, so I think it is the best place to generate the manual and pack it within the tarball (which looks like your first option with
|
I would say to generate all of them. Like git does. There is Example from git:
I guess you could. I probably would do it and then let downstream/distributions decide which one of them they package and how (subpackages for each completion) according to their policies. I consinder man pages of more importance since users use them to learn about the commands and some distributions have them mandatory for each binary. And the completions are more of a convenience. |
I meant how to name files, where to place them etc. But you answered the question, I guess it is under The only drawback I see for generating everything and packing all within the tarball is that it make the tarball "heavier" and messier. After thinking about it, I find it cleaner to add a section in the wiki dedicated to package maintainers on how to generate completions and man files, and let them generate + place them at the right place. So I resume the 2 remaining tasks:
What do you think about it? |
That sounds fine. Thank you |
I just pushed the changes for the man command to generate all man pages for all subcommands, and I updated the wiki for the completion and the man. Thanks a lot for your precious help and for making this tool better 🙏 |
I just wanted to add that maybe some distributions won't like that they will first have to build the binary and then are able to call that binary to create the man pages instead of the man pages being created through some build tool. We will see :) |
I understand, let's see how it behaves! Anyway, we can adjust the process any time 🙂 |
* update codebase with email lib changes (#431) update himalaya-lib, rename remaining mbox vars add missing methods from lib update changelog * fixed missing folder aliases #430 * improve README links * fix README repology link * fix README repology table * fix README repology table 2 * center README repology table * fix README cosmetic issues * fix README cosmetic issues 2 * fix README title * fix README wiki links * fix lock file * prepare v0.6.2 * fix ci * try some musl builds #356 * add musl build to artifact #356 * add musl build to deployment pipeline #356 * migrate clap v4, add man command #419 * add option to choose color manually #407 * update links and badges * update matrix badge * add github release version badge * update badges links * fix code bloc type * fix tests * fix cargo lock * generate all man pages for all subcommands #419 * fix query and headers arg parsers * fix invalid flags and options due to clap v4 migration * fix tests * remove -l|--log-level option * refactor contributing guide * update lib * fix flags string printer * make commands read, attachments, copy, move and delete accept multiple ids * fix ids arg parser * fix flags subcommands conflicts between ids and flags * flip back copy and move arguments * add issue template (#439) * update lib, prepare for sync feature * update himalaya lib, fix senders and config * update lock file himalaya lib * fix sync enabling issues * fix wrong imap backend init in main file * fix notmuch backend post sync feature * configuration wizard (#432) * make DeserializedConfig::path more robust With this change, himalaya uses the crate `dirs` in order to follow XDG specifications on Unix, Known Folder on Windows and Standard Directories on MacOS. This gives us much smoother cross-platform support. It still has the same fallbacks (`$HOME/.config/himalaya/config.toml` and `$HOME/.himalayarc`.) Additionally, this commit removes a bit of in-house code-bloat. * add wizard entrypoint and basic structure * wip * feat: impl Serialize for all DeserializedConfigs * feat: select default account and write to file * feat: add SMTP part of wizard * build: update lockfile * refactor: separate out multiple files for wizard * style: friendlier and prettier messages * feat: add maildir part of wizard * feat: add notmuch part of wizard * chore: clippy lints and reorder prompts * fix: contrived solution to serializing None values * fix: allow empty Option field when deserializing * style: address PR review comments * fix: utilize notmuch lib in finding database path * fix notmuch wizard --------- Co-authored-by: Clément DOUIN <clement.douin@posteo.net> * add account sync progress bar * improve sync spinner * make the sync dry run flag show patches without applying them * update himalaya lib, increase imap session pool size * add disable cache flag * add nlnet logo in readme * update himalaya lib deps, make use of sync reports * prepare v0.7.0 * bump rustc v1.67.0 and clap v4.1.4 * bump himalaya lib v0.5.1, fix flake lock file --------- Co-authored-by: janabhumi <dmitriy@ideascup.me> Co-authored-by: Knut Magnus Aasrud <km@aasrud.com>
I have to agree with this. I have been maintaining himalaya in Void Linux for the past couple of releases. While it's possible to run the built binary to generate manpages and completions, it's a lot cleaner if it's provided in the source archive itself - https://github.com/casey/just for example. |
I have to agree with this. I have been maintaining himalaya in Void
Linux for the past couple of releases. While it's possible to run the
built binary to generate manpages and completions, it's a lot cleaner
if it's provided in the source archive itself -
https://github.com/casey/just for example.
Then let's pack man pages and completion scripts to the releases, should
be easy to do. I opened an [issue]. Thank you for your feedback (and for
maintaining himalaya in Void Linux!).
[issue]: https://todo.sr.ht/~soywod/pimalaya/43
|
What is the convention usually? For man pages I guess it is a |
|
`completions/` and `contrib/completions/` are the most common ones but
I have seen `assets/completions/` and `extras/completions/` as well.
Perfect, so let's go for `/man` and `/completions`!
|
Feature implemented on |
Nice! |
With the inclusion of himalaya to various Linux distributions we should fulfill the requirement of having a manual page for each executable.
I chose to write the man page in markdown for easier editing.
It can then be transformed into a regular man page via pandoc:
pandoc --standalone --to man himalaya.1.md -o himalaya.1
A release tarball will only need to ship the
himalaya.1
file. I'm not sure whether you prefer to have the tranformation process in some release script. I decided to add both thehimalaya.1
andhimalaya.1.md
file to the repository, and not just the producthimalaya.1
, so that users who don't have pandoc installed can already view the manpage viaman man/himalaya.1
when checking out the git repository.