瀏覽代碼

Forward-port https://trac.osgeo.org/grass/changeset/51493

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@51519 15284696-431f-4ddb-bdfa-cd5b030d7da7
Glynn Clements 13 年之前
父節點
當前提交
d1c730e628
共有 3 個文件被更改,包括 10 次插入3 次删除
  1. 3 3
      man/Makefile
  2. 2 0
      man/build_class.py
  3. 5 0
      man/build_html.py

+ 3 - 3
man/Makefile

@@ -48,16 +48,16 @@ define build
 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

+ 2 - 0
man/build_class.py

@@ -22,6 +22,8 @@ filename = modclass + ".html"
 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:

+ 5 - 0
man/build_html.py

@@ -205,6 +205,11 @@ r""" ]
 """
 #"
 
+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>