ronn: Describe and render Ronn documentation

[ agpl, documentation, library ] [ Propose Tags ]

Please see README.md


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 1.0.0.0
Change log CHANGELOG.md
Dependencies base (>=4.16.4.0 && <5), text (>=1.2.5.0) [details]
License AGPL-3.0-only
Author
Maintainer Pat Brisbin
Category Documentation
Home page https://github.com/pbrisbin/ronn#readme
Bug tracker https://github.com/pbrisbin/ronn/issues
Source repo head: git clone https://github.com/pbrisbin/ronn
Uploaded by PatrickBrisbin at 2024-10-26T13:27:42Z
Distributions
Downloads 13 total (13 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2024-10-26 [all 1 reports]

Readme for ronn-1.0.0.0

[back to package description]

Ronn

Hackage Stackage Nightly Stackage LTS CI

Describe and render Ronn documentation.

Why Ronn?

Ronn is a markdown-like format for describing man-pages. Files written in Ronn can be viewed as markdown (e.g. rendered on GitHub), or converted to Roff or HTML using the ronn command-line.

There are many ways to author or produce man-pages in Roff and HTML formats from a single source, but Ronn produces by far the highest-quality outputs from the simplest source. Tools like man2html or even Pandoc often produce sub-standard output in certain cases, or lack features such as cross-references.

Here is some example Ronn:

ronn(1) -- example ronn man-page
================================

## SYNOPSIS

`ronn` [options] <argument>

## DESCRIPTION

This is an example man-page to show how rendering the AST Looks

## OPTIONS

  * `-h`, `--help`:
    Display this help

  * `-o`, `--output`=<FILE>:
    Output to `FILE`

## ENVIRONMENT

  * `HOME`:
    User's HOME directory

    Some further details:

      * foo:
        The foo

      * bar:
        The bar

## SEE ALSO

**markdown(7)**, **roff(7)**

Here is it rendered to Roff and opened with man:

And here it is rendered to HTML:

This package contains the Ronn AST type and a rendering function. Companion packages are planned to automatically convert any optparse-applicative, envparse, or opt-env-conf Parser type into a Ronn value. This will allow any application using one of these libraries to maintain high-quality man-pages automatically.

Usage

For an example of building an AST by hand, and what the rendered Text looks like, see the test suite

Once you've created a .ronn file from the rendered Text, you can use the ronn-ng gem produce a high-quality man-page and HTML:

% ronn --style toc --roff --html path/*.ronn

LICENSE | CHANGELOG