-
-
Notifications
You must be signed in to change notification settings - Fork 327
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] manual: multi-tools and multi-addons lack short descriptions #4972
Comments
Hello, I’m Niwesh Sah, a sophomore pursuing B.Tech in Computer Science from India. I’m new to open source and would like to contribute to this issue as my first task. I have a question to better understand the problem: If possible, I’d love to work on this issue. Please let me know if I can proceed. |
They used to be defined when the full HTML headers where still present (which is undesired). I guess new code additions are needed in https://github.com/OSGeo/grass/blob/main/man/build_html.py and related files. |
This "description" is generated by ./utils/mkhtml.py file according meta comment(s) or without them inside man source HTML page:
<!-- meta page name: g.parser -->
<!-- meta page name description: Provides full parser support for GRASS scripts. --> then you get in generated man HTML page: NAME section with g.parser - Provides full parser support for GRASS scripts. (PGM + DESC)
<!-- meta page description: Landscape structure analysis package overview --> then you get in generated man HTML page: Landscape structure analysis package overview title only
Lines 354 to 370 in c0b45cf
Lines 122 to 131 in c0b45cf
|
Thanks so much for these insights, @tmszi ! Honestly, this way:
was new to me :) I'd suggest to add your explanations to https://github.com/OSGeo/grass/blob/main/doc/development/style_guide.md#documentation |
@tmszi Can you also refer to the Python file that generates the documentation for https://grass.osgeo.org/grass84/manuals/r.li.html? I believe that the ./utils/mkhtml.py script you mentioned is responsible for generating individual pages like https://grass.osgeo.org/grass84/manuals/r.li.edgedensity.html or similar files. Could you confirm if my understanding is correct? |
See how it's addressed in addons: |
r.li.html man page source code . Generated r.li.html man page file location is in my GNU/Linux OS Gentoo distribution under /usr/lib64/grass85/docs/html/ directory:
Content part of generated r.li.html man page: test@test-gnu-linux:/usr/lib64/grass85/docs/html$ cat r.li.html | head -n 32
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Landscape structure analysis package overview - GRASS GIS Manual</title>
<meta name="Author" content="GRASS Development Team">
<meta name="description" content="Landscape structure analysis package overview: GRASS GIS Reference Manual">
<link rel="stylesheet" href="grassdocs.css" type="text/css">
<meta http-equiv="content-language" content="en-us">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body bgcolor="white">
<div id="container">
<a href="index.html"><img src="grass_logo.png" alt="GRASS logo"></a>
<h2>Landscape structure analysis package overview</h2>
<div class="toc">
<h4 class="toc">Table of contents</h4>
<ul class="toc">
<li class="toc"><a href="#description" class="toc">DESCRIPTION</a></li>
<li class="toc"><a href="#notes" class="toc">NOTES</a></li>
<li class="toc"><a href="#examples" class="toc">EXAMPLES</a></li>
<li class="toc"><a href="#see-also" class="toc">SEE ALSO</a></li>
<li class="toc"><a href="#adding-new-indices" class="toc">ADDING NEW INDICES</a></li>
<li class="toc"><a href="#references" class="toc">REFERENCES</a></li>
<li class="toc"><a href="#authors" class="toc">AUTHORS</a></li>
</ul>
</div>
<!-- meta page description: Landscape structure analysis package overview -->
<h2><a name="description">DESCRIPTION</a></h2>
The <em>r.li</em> suite is a toolset for multiscale analysis of
In the case of example r.li.* (root directory) module, all *.html was parsed by ./utils/mkhtml.py script during GRASS GIS source code compilation (according Makefile directive) including r.li.html src man page. |
Describe the bug
All multi-tools (
r.li
,i.sentinel
addon, etc.) have a "meta" manual page.Traditionally, these contained the full HTML header/footer (example), since no parser-related compilation is involved and the HTML file was copied as-is into the target manual subdirectory.
For a short period of time (I could not identify when the change happened), the reduced manual page structure starting with "DESCRIPTION" and without footer is apparently also accepted, and the full manual pages are built.
GRASS GIS core
Core example
r.li
meta manual page:Yet the title is not turned into a description:
https://grass.osgeo.org/grass84/manuals/raster.html
GRASS GIS addons:
A similar problem arises with addons:
https://grass.osgeo.org/grass84/manuals/addons/
Only those meta manual pages which still contain full headers/footers are fine.
Expected behavior
The current manual magic needs to be fixed/expanded to carry over the title as short description.
The text was updated successfully, but these errors were encountered: