Skip to content

Commit

Permalink
G78 cronjobs: add "new version G8" box into man pages (#718)
Browse files Browse the repository at this point in the history
* G78 cronjobs: add "new version G8" box into man pages

This PR injects a red box into the G78 manual pages, pointing to the respective G80 manual page.

In addition, add major version number to addon manual landing page title.

* Improve new-version-box text as suggested by @wenzeslaus
  • Loading branch information
neteler committed Mar 25, 2022
1 parent 038600e commit d831350
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
# - generates the pyGRASS 7 HTML manual
# - generates the user 7 HTML manuals
# - injects DuckDuckGo search field
# - injects G8 new version box

# Preparations:
# - Install PROJ: http://trac.osgeo.org/proj/ incl Datum shift grids
Expand Down Expand Up @@ -166,6 +167,12 @@ echo "Injecting DuckDuckGo search field into manual main page..."

cp -p AUTHORS CHANGES CITING COPYING GPL.TXT INSTALL REQUIREMENTS.html $TARGETDIR/

# inject G8.x new version hint in a red box:
(cd $TARGETHTMLDIR/ ; for myfile in `ls *.html` ; do sed -i -e "s:<hr class=\"header\">:<hr class=\"header\"><p style=\"border\:3px; border-style\:solid; border-color\:#BC1818; padding\: 1em;\">Note\: This document is for an old version of GRASS GIS that is no longer supported. You should upgrade, and read the <a href=\"../../grass-stable/manuals/$myfile\">current manual page</a>.</p>:g" $myfile ; done)
# also for Python
(cd $TARGETHTMLDIR/libpython/ ; for myfile in `ls *.html` ; do sed -i -e "s:<hr class=\"header\">:<hr class=\"header\"><p style=\"border\:3px; border-style\:solid; border-color\:#FF2121; padding\: 1em;\">Note\: This document is for an old version of GRASS GIS that is no longer supported. You should upgrade, and read the <a href=\"../../../grass-stable/manuals/libpython/$myfile\">current Python manual page</a>.</p>:g" $myfile ; done)


# clean wxGUI sphinx manual etc
(cd $GRASSBUILDDIR/ ; $MYMAKE cleansphinx)

Expand Down
4 changes: 2 additions & 2 deletions utils/cronjobs_osgeo_lxd/grass-addons-index.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,13 @@ generate () {
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">
<html>
<head>
<title>GRASS GIS ${major} Addons Manual pages</title>
<title>GRASS GIS ${major}.${minor} Addons Manual pages</title>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">
<meta name=\"Author\" content=\"GRASS Development Team\">
<link rel=\"stylesheet\" href=\"../grassdocs.css\" type=\"text/css\">
</head>
<body bgcolor=\"#FFFFFF\">
<h2>GRASS GIS ${major} Addons Manual pages</h2>
<h2>GRASS GIS ${major}.${minor} Addons Manual pages</h2>
<!-- Generated from: grasslxd (on osgeo7): ~/cronjobs/grass-addons-index.sh -->
<!-- See also: https://github.com/OSGeo/grass-addons/tree/grass8/utils/cronjobs_osgeo_lxd/README.md -->
Expand Down

0 comments on commit d831350

Please sign in to comment.