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).
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.
?
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}.
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.
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().
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().