During this season of giving, you can show your support for the NTP Project by making a donation to Network Time Foundation.

Documentation Pre-Processor (Google Summer Of Code - 2008)


We are using AutoOpts from GNU AutoGen to handle the command-line options processing of the NTP programs.

AutoOpts has the ability to produce a variety of program documentation, including man pages, html, .texi, and .txt.It consist of set of AutoGen templates and run time library makes it easy to parse command -line option.

Right now, AutoOpts puts "plain text" into its output formats. I'd like to have a framework where we can at least begin to support some sort of "tags" where we can put information into different fonts (like using ntpd when documenting the ntpd command, perhaps "declaring" that we are using a mandoc style and using .Nm whenever we want to see ntpd). I'd also like the ability to document configuration keywords, and perhaps some support for simple tables.

If the "source" for the documentation is used to produce a man page, the output would be a decent-looking man page. If this same source is used to produce .texi page, the resulting .info page should also look good (and perhaps contain appropriate cross-indexes).

We need something more than what we have now, and I would expect that the results of this effort would be incorporated into the AutoGen project, so even more folks could benefit from this work.

One idea I had for this was that one could specify the "format" for the embedded doc strings in the .def file. For example, options could include .man, .mandoc, .texi and .pod (and maybe .html). This "autogen doc processor" would grok the doc strings based on the specified format, and use that info to properly (at least as best as can be done) assist in the production of the various formats.

Here is one possible way to specify this.

 detail = <<- _END_DETAIL 
        Here is a plain-text detail line. 
 detail = <<- _END_DETAIL MAN
        .SH This is a section heading.
 detail = <<- _END_DETAIL MDOC 
        .Sh This is a section heading.
 detail = <<- _END_DETAIL TEXI 
        Here is a @strong{strong} detail line using @code{.texi} markup. 
 detail = <<- _END_DETAIL POD 
        =head1 This is a Heading 
        and here is a L<crontab(5)> link to a man page. 

Status Reports: GSoC2008docStatusReports

Sponsoring Organization: https://www.gnu.org/s/soc-projects/ideas.html#autogen

Requirements: C, possibly guile

Related Topics: GNUAutoGenConversion

Preferred License: LGPL

Student: RahulKumar

Mentor: HarlanStenn (with help from BruceKorb, the primary developer of AutoGen)

How do you think his project can be implemented and what exactly the milestone should consist of? I think that I will have to write a plugin or something called "doc processor" in scheme by using guile and incorporate into the autoopts.

-- RahulKumar - 02 May 2008


As for implementation, there is one idea in the proposal above.

I recommend you look at the items in the "Related Topics:" section above and also at the man pages for the various parts of NTP that are included with, for example, FreeBSD.

We figure out a list of items that will need to be formatted for the various output styles we will need. This may include:
  • formatting the program name
  • config file formats/syntax/descriptions
  • info for man page sections (FILES, SEE ALSO, BUGS)

We figure out some ways to do it.

-- HarlanStenn - 02 May 2008


You might want to check out Bug #921. There are some other bugs that you might want to at least be aware of - a search for bugs containing the word 'documentation' will find them (and some extras you won't care about).

-- HarlanStenn - 12 Jun 2008

Harlan's suggestion to produce varity of docs seems good. is this idea already implemented since this is exactly after one year

-- KapilaBogahapitiya - 26 Mar 2009

Kapila, we made progress last year and have a much better idea of how to proceed.

This project still needs to be implemented.

-- HarlanStenn - 28 Mar 2009

Implementation Milestones

Task Description % Done Delivery Date
Frame work design
All the features we want to implement like tag support and support for tables.
Writing document processor
It will be written in LISP/scheme.It will support pre and post triggers.
Integrating it to AutoGen.
By use of GNU AutoMake tools.
Applying it for NTP.
Finally the purpose is met.
06 Jun Status
using mandoc to decide features for man page
100 %
20 Jun Status
making ntpd(8) man page
100 %
04 Jul Status
improving ntpd(8) page
Midterm Eval
Begin Midterm Evaluation
Midterm Eval
Midterm Evaluation Due
18 Jul Status
Biweekly Status Report
01 Aug Status
Biweekly Status Report
Wrap Up
Soft "Pencils Down"
15 Aug Status
Biweekly Status Report
Project Ends
Hard "Pencils Down"
Final Evaluation
Final Evaluation

-- HarlanStenn - 22 May 2008
Topic revision: r23 - 05 Oct 2022, DruLavigne
Copyright © by the contributing authors.Use of this website indicates your agreement with, and acceptance of, the PrivacyPolicy, the WikiDisclaimer, and the PrivateWebPolicy.