Giter Club home page Giter Club logo

Comments (6)

alerque avatar alerque commented on September 8, 2024 1

One potential alternative would be to port from structopt to Clap — which can work very nearly the same but is also a bit more flexible. There are already ways to convert the --help output it generates to man pages, but there is also progress on it's internal manpage generation: clap-rs/clap#552

from git-cliff.

grawlinson avatar grawlinson commented on September 8, 2024 1

There is clap_mangen now. 🎉

from git-cliff.

alerque avatar alerque commented on September 8, 2024

Updates on my comment above:

  • Clap v3 is out. It now directly consumes StructOpt structs, so porting should be easy.
  • Man page generation isn't there yet, but there is WIP.

from git-cliff.

orhun avatar orhun commented on September 8, 2024

I added a man page generation script in 03d55c8. Man page can be generated and viewed like this:

OUT_DIR=$(pwd) cargo run --bin git-cliff-mangen
man ./git-cliff.1

from git-cliff.

alerque avatar alerque commented on September 8, 2024

I think this should probably go in build.rs, possibly behind an on-by-default feature flag so people that don't want to compile the dependency crates don't have to. The matching man page can then be considered a standard artifact of the build process.

... of course if you follow my logic too far you have to wrap Rust projects in a proper build system like autoconf so everything gets installed to the right places depending on the system without putting the burden on distro packages to reinvent the wheel to spin up everything by hand in each upstream project.

from git-cliff.

orhun avatar orhun commented on September 8, 2024

I think this should probably go in build.rs, possibly behind an on-by-default feature flag so people that don't want to compile the dependency crates don't have to. The matching man page can then be considered a standard artifact of the build process.

I think I'm going to leave it as is for now. Completions are also generated with the same approach.

from git-cliff.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.