Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/property404/doc2readme
Make a README from rust docs
https://github.com/property404/doc2readme
Last synced: 27 days ago
JSON representation
Make a README from rust docs
- Host: GitHub
- URL: https://github.com/property404/doc2readme
- Owner: Property404
- License: gpl-3.0
- Created: 2023-12-21T04:19:57.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-01T04:20:37.000Z (about 1 year ago)
- Last Synced: 2024-01-02T01:54:05.135Z (about 1 year ago)
- Language: Rust
- Homepage:
- Size: 238 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cargo-doc2readme
Convert crate documention into a README
Alternative to [cargo-readme](https://docs.rs/cargo-readme). Unlike `cargo-readme`,
`cargo-doc2readme` parses the output of rustdoc instead of extracting the doc comments directly
from the rust source. The main advantage here is that `cargo-doc2readme` can handle relative
links in crate documentation.## Basic Usage
Install:
```shell
cargo install cargo-doc2readme --git https://github.com/Property404/doc2readme
```Usage:
```shell
$ cargo doc2readme -o README.md
```## Templating
`cargo-doc2readme` uses [minjinja](https://docs.rs/minijinja) as its
templating engine, which happens to be a superset of `cargo-readme`’s templating engine. Like
`cargo-readme`, `cargo-doc2readme` uses `README.tpl` as the template by default if it exists,
but this can be overridden with the `--template` command line option.The default template is:
```jinja
# {{crate}}{{readme}}
{% if license != none %}
## License{{license}}
{% endif %}
```### Template variables
* `crate` - the crate name, alias for `package.name`
* `license` - the crate license, alias for `package.license`
* `readme` - the generated readme text
* `version` - the crate version, alias for `package.version`
* `package` - All package keys## Todo
* Get dependencies published
## License
GPL-3.0