[GRASS-SVN] r51519 - grass/trunk/man

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Apr 24 08:01:32 EDT 2012


Author: glynn
Date: 2012-04-24 05:01:32 -0700 (Tue, 24 Apr 2012)
New Revision: 51519

Modified:
   grass/trunk/man/Makefile
   grass/trunk/man/build_class.py
   grass/trunk/man/build_html.py
Log:
Forward-port r51493


Modified: grass/trunk/man/Makefile
===================================================================
--- grass/trunk/man/Makefile	2012-04-24 12:00:01 UTC (rev 51518)
+++ grass/trunk/man/Makefile	2012-04-24 12:01:32 UTC (rev 51519)
@@ -48,16 +48,16 @@
 GISBASE="$(RUN_GISBASE)" ARCH="$(ARCH)" ARCH_DISTDIR="$(ARCH_DISTDIR)" $(PYTHON) ./build_$(1).py $(2)
 endef
 
-$(HTMLDIR)/full_index.html: $(ALL_HTML)
+$(HTMLDIR)/full_index.html: $(ALL_HTML) build_full_index.py build_html.py
 	$(call build,full_index)
 	touch $@
 
-$(HTMLDIR)/index.html:
+$(HTMLDIR)/index.html: build_index.py build_html.py
 	$(call build,index)
 	touch $@
 
 define category_rule
-$$(HTMLDIR)/$(2).html: $$(wildcard $$(HTMLDIR)/$(1).*.html)
+$$(HTMLDIR)/$(2).html: $$(wildcard $$(HTMLDIR)/$(1).*.html) build_class.py build_html.py
 	$$(call build,class,$(1) $(2))
 	touch $$@
 endef

Modified: grass/trunk/man/build_class.py
===================================================================
--- grass/trunk/man/build_class.py	2012-04-24 12:00:01 UTC (rev 51518)
+++ grass/trunk/man/build_class.py	2012-04-24 12:01:32 UTC (rev 51519)
@@ -22,6 +22,8 @@
 f = open(filename + ".tmp", 'wb')
 
 write_html_header(f, "GRASS GIS %s Reference Manual: %s" % (grass_version, modclass))
+if modclass.lower() not in ['general', 'misc', 'postscript']:
+    f.write(modclass_intro_tmpl.substitute(modclass = modclass, modclass_lower = modclass.lower()))
 f.write(modclass_tmpl.substitute(modclass = modclass))
 
 #for all modules:

Modified: grass/trunk/man/build_html.py
===================================================================
--- grass/trunk/man/build_html.py	2012-04-24 12:00:01 UTC (rev 51518)
+++ grass/trunk/man/build_html.py	2012-04-24 12:01:32 UTC (rev 51519)
@@ -205,6 +205,11 @@
 """
 #"
 
+modclass_intro_tmpl = string.Template(\
+r"""Go to <a href="${modclass_lower}intro.html">${modclass} introduction</a><p>
+""")
+#"
+
 modclass_tmpl = string.Template(\
 r"""Go <a href="index.html">back to help overview</a><BR><BR><BR>
 <b>${modclass} commands:</b>



More information about the grass-commit mailing list