No commit activity in last 3 years
No release in over 3 years
An mdoc(7) generator for RDoc
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.6
~> 10.0

Runtime

 Project Readme

rdoc-generator-mdoc

An experimental mdoc(7) generator for RDoc.

The generator outputs one man page per Ruby module, class and method in mdoc(7) format.

Installation

Install rdoc-generator-mdoc using RubyGems:

$ gem install rdoc-generator-mdoc

You can also use Bundler to install rdoc-generator-mdoc by adding this line to your Gemfile:

gem "rdoc-generator-mdoc"

Then run the bundle command:

$ bundle

Usage

In your Ruby source code

Specify mdoc as the formatter using the -f option when calling RDoc::RDoc#new:

require "rdoc/generator/mdoc"

RDoc::RDoc.new.document "-f mdoc"

Since RDoc is often used to document Ruby libraries and section 3 of the Unix manual generally contains library documentation, the mdoc generator will assign the generated man pages to section 3-rdoc by default. If you want the man pages to be assigned to a different section, specify the section using the --section option:

RDoc::RDoc.new.document "-f mdoc --section 3-my-section"

For more information on using the RDoc::RDoc class see the official RDoc documentation. For more information on manual sections see man(1).

Using the rdoc executable

Specify mdoc as the formatter using the -f option:

$ rdoc -f mdoc

Since RDoc is often used to document Ruby libraries and section 3 of the Unix manual generally contains library documentation, the mdoc generator will assign the generated man pages to section 3-rdoc by default. If you want the man pages to be assigned to a different section, specify the section using the --section option:

$ rdoc -f mdoc --section 3-my-section

For more information on manual sections see man(1).

Reading generated man pages

The generated man pages are viewable directly using man -l FILE or using man [SECTION] PAGE after putting them in a directory on the $MANPATH (see man(1) for details).

Copyright

Copyright (c) 2014 Calle Erlandsson & thoughtbot, Inc.

Lead by Calle Erlandsson & thoughtbot, Inc.