wiki:ManPageRendererPlugin

Version 5 (modified by Piers O'Hanlon, 15 years ago) (diff)

Added link to original submission

Unix Manual page renderer

Description

A plugin for rendering unix manual pages to HTML so they're human readable when browsing the repository.

Specifically it extends the IHTMLPreviewRenderer component of the mimeviewer to pass the nroff man page through groff which generates an HTML version of the page. I originally submitted it as a new enhancement a while back to the main trac site but trac-hacks seems to be the place for such things now.

Bugs/Feature Requests

Existing bugs and feature requests for ManPageRendererPlugin are here.

If you have any issues, create a new ticket.

Download

Download the zipped source from [download:manpagerendererplugin here].

Source

You can check out ManPageRendererPlugin from here using Subversion, or browse the source with Trac.

Install

The simplest way to install it is using easy_install:

easy_install http://trac-hacks.org/svn/ldapplugin/0.11/

This plugin uses groff so it needs to be installed on your machine (it usually is installed on most unixes) and if it is not in the usual place of /usr/bin/groff you can specify its location in the trac.ini file:

groff_path = /your_path/groff

You will need to enable it in trac.ini:

manpagerenderer.* = enabled

It will automatically render pages ending .man but if you want it to render man pages that end in .1 (or something else) then add this to [mimeviewer] section:

mime_map = application/x-troff-man:1

And/or you can set svn:mime-type property to application/x-troff-man for specific files you want renderer by the plugin.

Example

See it working on our trac site: http://frostie.cs.ucl.ac.uk/nets/mmedia/browser/rat/trunk/man/man1/rat.1

Recent Changes

16531 by rjollos on 2017-04-16 02:23:15
Fix indentation
16397 by rjollos on 2017-03-25 09:37:00
Remove obsolete "0.9" code
6358 by pierz on 2009-08-11 09:58:54
Added url entry to point to homepage http://trac-hacks.org/wiki/ManPageRendererPlugin
(more)

Author/Contributors

Author: Piers O'Hanlon
Contributors: