Comments (3)
Alternative proposal
Introduce render_to
which accepts a W: Write
r directly instead of allocating a string internally.
for man in gen_manuals(&app) {
let path = PathBuf::from(env!("CARGO_PKG_NAME")).push(man.path());
man.render_to(fs::File::create(&path)?)?;
}
This is more work and it will only be really useful if we manage to add a similar API to our roff crate (not that hard), too; rroff already works like this internally.
from man.
Perhaps we could make this a good first issue to help onboard someone?
from man.
@killercup oh I like that a lot! - I reckon if we go with your approach, we should also introduce a method to at least have access to the name. E.g. so if people choose to go with a deviating approach (for whatever reason) at least the basic requirements are available to them.
from man.
Related Issues (17)
- Which sections should a man page have? HOT 3
- Have "source" section
- Add DESCRIPTION section
- API design HOT 2
- The README example does not compile HOT 1
- Support for custom sections? HOT 3
- Improve `exit status` section HOT 5
- Add version/date API HOT 1
- Add examples API HOT 1
- Format example in README to show bold HOT 1
- Document full use-case (e.g., `build.rs` script) HOT 5
- Options with no "="
- update to roff 0.2? HOT 1
- Accept more types of positional arguments
- Design: how should we display subcommands? HOT 1
- Move clap v3 -> man glue code to clap_generate HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from man.