YaLTeR / wl-clipboard-rs

A safe Rust crate for working with the Wayland clipboard.
Apache License 2.0
223 stars 16 forks source link

Add man pages for terminal utilities #2

Open YaLTeR opened 5 years ago

YaLTeR commented 5 years ago

Probably autogenerate for clap-based ones and write manually for wl-clip.

zefr0x commented 1 year ago

I would like to work in the clap-based part, but since this project uses structopt, i don't think that it's possible to do in the build time.

We can do it, by providing an option in the CLI to print a man page in the runtime, but it will not be clean, and it will add complexity to the code, and an option that user will not use.

Do you think that we first should use clap directly rather then the structopt wrapper?

YaLTeR commented 1 year ago

Hm, I really like structopt. :/ Is there really no way, even with the newer clap? They have integrated structopt I think so I would expect there should be some way?

zefr0x commented 1 year ago

Oh, sorry, I found a way. I should've tried more things.

I faced a problem with the ::clap() method on the Options struct, since I didn't include structopt as a build-dependencies. I thought that it was because the build script should run before building the tool it self, it couldn't resolve the macros.

We just need to move the Options struct to another file, so when we include it in the build script we don't need to have all the dependencies.

For now i'm having another problem: expected struct clap::builder::command::App, found struct App I will try to solve it, but I don't know if it's possible to get a clap::builder::command::App from structopt.

zefr0x commented 1 year ago

They have integrated structopt I think so I would expect there should be some way?

That's great, I will try to work with the latest version.

I didn't work before with the macros part of clap, but definitely it be better integrated.

YaLTeR commented 1 year ago

Sounds good!