[GRASS-dev] Manpage HTML markup consistency

Hamish hamish_b at yahoo.com
Tue Feb 26 01:16:07 EST 2008


Glynn Clements wrote:
> Also, although g.html2man attempts to handle tables, it doesn't
> seem to work.

I think it's just missing a line break,


Index: tools/g.html2man/g.html2man
===================================================================
--- tools/g.html2man/g.html2man (revision 30354)
+++ tools/g.html2man/g.html2man (working copy)
@@ -52,7 +52,7 @@
   $ncols = -1 + scalar split /<td/i, $one_row;
   $has_header = m|<th|i ;
   s|[\n\r]||g;
-  s|</tr.*?>|\n|gis;
+  s|</tr.*?>|\n.br\n|gis;
   s|</td.*?>|\t|gis;
   foreach $tag ( qw(<td.*?> <th.*?> </th> <tr.*?>) ){
     s/$tag//gi;

?

editing the r.in.xyz.1 file by hand with that modification makes the
table look nice in the man page. groff has some tbl() function too, but
I'm not at all familiar with how to use it or how portable it is.


from within the script:
# TODO: rewrite g.html2man using the HTML::Parser module



As for rewriting with Python, sure that could be really good. But as
Python will not be a mandatory dependency until GRASS 7 the g.html2man
shell script should remain as the default for the 6.x branches.


Hamish



      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 




More information about the grass-dev mailing list