[GRASS5] 5.7: man pages generated now

Hi,

I have made the (minimum) changes to generate MAN
pages in GRASS 5.7-CVS.

Currently they are written to
man/man1/

TODO:
Due to the 'fakestart' problems with some of the
modules, the <TITLE> tag is missing in these pages.
In this case the g.html2man script gives an error.
However, the procedure continues.

This should also help for Debian (maybe someone can post
this to the related ML).

Cheers

Markus

I have made the (minimum) changes to generate MAN
pages in GRASS 5.7-CVS.

..

TODO:
Due to the 'fakestart' problems with some of the
modules, the <TITLE> tag is missing in these pages.
In this case the g.html2man script gives an error.
However, the procedure continues.

I notice that the online help index still fails to generate the
description line for 5.7's v.in.garmin (and others). The module's help
page itself is now created correctly.
?

http://grass.itc.it/grass57/manuals/html57_user/vector.html

other than that it is the interactive modules that don't describe
themselves correctly and the db.* commands.

This should also help for Debian (maybe someone can post
this to the related ML).

done.

Hamish

Hamish wrote:

other than that it is the interactive modules that don't describe
themselves correctly and the db.* commands.

Most (all?) of the db.* commands initialise the defaults for the
driver= and database= options using the functions
db_get_default_driver_name() and db_get_default_database_name()
respectively. These functions call G__getenv2(), which fails if the
mapset is invalid.

Either G__getenv2() needs to be updated to handle the "fake start"
case, or (preferable, but unlikely to happen) we need to adopt (and
enforce) a rule that nothing gets called before G_parser except for
G_gisinit and G_define_{module,option,flag}.

--
Glynn Clements <glynn@gclements.plus.com>

just to note r.terraflow is also missing from the raster index.

  http://grass.ibiblio.org/grass57/manuals/html57_user/raster.html

Hamish

On Thu, Nov 04, 2004 at 06:48:57PM +1300, Hamish wrote:

just to note r.terraflow is also missing from the raster index.

  http://grass.ibiblio.org/grass57/manuals/html57_user/raster.html

Fixed in 5.3/5.7.

Markus

On Thu, Nov 04, 2004 at 06:48:57PM +1300, Hamish wrote:

just to note r.terraflow is also missing from the raster index.

I have added more 'fakestart' support to various modules.
Now the list of modules still causing problems is shrinked
to

cd dist.$ARCH/docs/html

find . -name "*.html"|xargs fgrep --files-without-match DOCTYPE
./d.rast.edit.html
./g.access.html
./g.parser.html
./g3.region.html
./g.setproj.html
./i.ask.html
./i.class.html
./i.find.html
./i.ortho.photo.html
./photo.2image.html
./photo.2target.html
./photo.camera.html
./photo.elev.html
./photo.init.html
./photo.rectify.html
./photo.target.html
./i.points.html
./i.vpoints.html
./r.coin.html
./r.digit.html
./r.le.setup.html
./r.mapcalc.html
./r3.mapcalc.html
./r.region.html
./ram.html
./seg.html
./r.terraflow.html
./r3.mask.html
./d.redraw.html
./pg.postgisdb.html
./v.build.all.html

In fact they seem to be all modules not using G_parser().
Currently I have no idea how to solve this problem.
Maybe by adding

    char *fakestart;

    /* fake session for HTML generation with parser */
    fakestart = getenv( "GRASS_FAKE_START" );

    if ( fakestart != NULL )
       return 0;

at the beginning of the related modules (so to exit immediately)?

And/or: adding some script magic to test for presence of DOCTYPE in
the generated HTML if, if not present, add generic header/footer.
In order to get the HTML/MAN pages complete.

Let me know

Markus

Markus Neteler wrote:

I have added more 'fakestart' support to various modules.
Now the list of modules still causing problems is shrinked
to

[snip]

In fact they seem to be all modules not using G_parser().
Currently I have no idea how to solve this problem.
Maybe by adding

    char *fakestart;

    /* fake session for HTML generation with parser */
    fakestart = getenv( "GRASS_FAKE_START" );

    if ( fakestart != NULL )
       return 0;

at the beginning of the related modules (so to exit immediately)?

And/or: adding some script magic to test for presence of DOCTYPE in
the generated HTML if, if not present, add generic header/footer.
In order to get the HTML/MAN pages complete.

The simplest solution is to just manually add the header to the
description.html or <program>.html files for those programs which
don't use G_parser().

--
Glynn Clements <glynn@gclements.plus.com>

On Fri, Nov 05, 2004 at 05:49:38AM +0000, Glynn Clements wrote:

Markus Neteler wrote:

> I have added more 'fakestart' support to various modules.
> Now the list of modules still causing problems is shrinked
> to

[snip]

> In fact they seem to be all modules not using G_parser().
> Currently I have no idea how to solve this problem.
> Maybe by adding
>
> char *fakestart;
>
> /* fake session for HTML generation with parser */
> fakestart = getenv( "GRASS_FAKE_START" );
>
> if ( fakestart != NULL )
> return 0;
>
> at the beginning of the related modules (so to exit immediately)?
>
> And/or: adding some script magic to test for presence of DOCTYPE in
> the generated HTML if, if not present, add generic header/footer.
> In order to get the HTML/MAN pages complete.

The simplest solution is to just manually add the header to the
description.html or <program>.html files for those programs which
don't use G_parser().

Done.

Markus