[GRASS-SVN] r52656 - in grass/trunk: db display doc general imagery imagery/i.find include/Make lib/gtcltk lib/vector man man/sphinx misc ps raster raster/r.watershed/ram raster/r.watershed/seg raster3d scripts temporal tools tools/timer vector vector/v.in.ogr

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Aug 13 06:09:45 PDT 2012


Author: lucadelu
Date: 2012-08-13 06:09:45 -0700 (Mon, 13 Aug 2012)
New Revision: 52656

Added:
   grass/trunk/include/Make/NoRest.make
   grass/trunk/include/Make/Rest.make
   grass/trunk/man/build_check_rest.py
   grass/trunk/man/build_class_rest.py
   grass/trunk/man/build_full_index_rest.py
   grass/trunk/man/build_index_rest.py
   grass/trunk/man/build_rest.py
   grass/trunk/man/sphinx/
   grass/trunk/man/sphinx/Makefile
   grass/trunk/man/sphinx/conf.py
   grass/trunk/man/sphinx/make.bat
   grass/trunk/tools/mkrest.py
Modified:
   grass/trunk/db/Makefile
   grass/trunk/display/Makefile
   grass/trunk/doc/Makefile
   grass/trunk/general/Makefile
   grass/trunk/imagery/Makefile
   grass/trunk/imagery/i.find/Makefile
   grass/trunk/include/Make/DB.make
   grass/trunk/include/Make/Dir.make
   grass/trunk/include/Make/Docs.make
   grass/trunk/include/Make/Etc.make
   grass/trunk/include/Make/Grass.make
   grass/trunk/include/Make/Lib.make
   grass/trunk/include/Make/Module.make
   grass/trunk/include/Make/Multi.make
   grass/trunk/include/Make/Other.make
   grass/trunk/include/Make/Rules.make
   grass/trunk/include/Make/Script.make
   grass/trunk/lib/gtcltk/Makefile
   grass/trunk/lib/vector/Makefile
   grass/trunk/man/Makefile
   grass/trunk/misc/Makefile
   grass/trunk/ps/Makefile
   grass/trunk/raster/Makefile
   grass/trunk/raster/r.watershed/ram/Makefile
   grass/trunk/raster/r.watershed/seg/Makefile
   grass/trunk/raster3d/Makefile
   grass/trunk/scripts/Makefile
   grass/trunk/temporal/Makefile
   grass/trunk/tools/Makefile
   grass/trunk/tools/timer/Makefile
   grass/trunk/vector/Makefile
   grass/trunk/vector/v.in.ogr/v.in.ogr.html
Log:
first implementation of restructredtext documentation

Modified: grass/trunk/db/Makefile
===================================================================
--- grass/trunk/db/Makefile	2012-08-13 11:54:28 UTC (rev 52655)
+++ grass/trunk/db/Makefile	2012-08-13 13:09:45 UTC (rev 52656)
@@ -27,3 +27,7 @@
 	$(MAKE) -C drivers
 	$(MAKE) parsubdirs
 
+restdocs: restdir
+
+restdir: $(MAKE) parsubdirs
+

Modified: grass/trunk/display/Makefile
===================================================================
--- grass/trunk/display/Makefile	2012-08-13 11:54:28 UTC (rev 52655)
+++ grass/trunk/display/Makefile	2012-08-13 13:09:45 UTC (rev 52656)
@@ -45,3 +45,7 @@
 default: htmldir
 
 htmldir: parsubdirs
+
+restdocs: restdir
+	 
+restdir: parsubdirs

Modified: grass/trunk/doc/Makefile
===================================================================
--- grass/trunk/doc/Makefile	2012-08-13 11:54:28 UTC (rev 52655)
+++ grass/trunk/doc/Makefile	2012-08-13 13:09:45 UTC (rev 52656)
@@ -6,3 +6,4 @@
 
 default: htmldir
 
+restdocs: $(MAKE) restdir

Modified: grass/trunk/general/Makefile
===================================================================
--- grass/trunk/general/Makefile	2012-08-13 11:54:28 UTC (rev 52655)
+++ grass/trunk/general/Makefile	2012-08-13 13:09:45 UTC (rev 52656)
@@ -35,3 +35,6 @@
 
 default: parsubdirs
 
+restdocs: restdir
+
+restdir: parsubdirs

Modified: grass/trunk/imagery/Makefile
===================================================================
--- grass/trunk/imagery/Makefile	2012-08-13 11:54:28 UTC (rev 52655)
+++ grass/trunk/imagery/Makefile	2012-08-13 13:09:45 UTC (rev 52656)
@@ -47,3 +47,7 @@
 
 htmldir: parsubdirs
 
+restdocs: restdir
+	 
+restdir: parsubdirs
+

Modified: grass/trunk/imagery/i.find/Makefile
===================================================================
--- grass/trunk/imagery/i.find/Makefile	2012-08-13 11:54:28 UTC (rev 52655)
+++ grass/trunk/imagery/i.find/Makefile	2012-08-13 13:09:45 UTC (rev 52656)
@@ -7,6 +7,7 @@
 
 include $(MODULE_TOPDIR)/include/Make/Etc.make
 include $(MODULE_TOPDIR)/include/Make/NoHtml.make
+include $(MODULE_TOPDIR)/include/Make/NoRest.make
 
 default: etc
 

Modified: grass/trunk/include/Make/DB.make
===================================================================
--- grass/trunk/include/Make/DB.make	2012-08-13 11:54:28 UTC (rev 52655)
+++ grass/trunk/include/Make/DB.make	2012-08-13 13:09:45 UTC (rev 52656)
@@ -7,11 +7,16 @@
 include $(MODULE_TOPDIR)/include/Make/Rules.make
 include $(MODULE_TOPDIR)/include/Make/Html.make
 include $(MODULE_TOPDIR)/include/Make/Compile.make
+include $(MODULE_TOPDIR)/include/Make/Rest.make
 
 dbmi: $(DBDRIVERDIR)/$(PGM)$(EXE) db_html
 
 db_html: $(HTMLDIR)/grass-$(PGM).html $(MANDIR)/grass-$(PGM).$(MANSECT)
 
+restdocs: $(DBDRIVERDIR)/$(PGM)$(EXE) db_rest
+
+db_rest: $(RESTDIR)/grass-$(PGM).txt
+
 $(DBDRIVERDIR)/$(PGM)$(EXE): $(ARCH_OBJS) $(DEPENDENCIES)
 	$(call linker)
 

Modified: grass/trunk/include/Make/Dir.make
===================================================================
--- grass/trunk/include/Make/Dir.make	2012-08-13 11:54:28 UTC (rev 52655)
+++ grass/trunk/include/Make/Dir.make	2012-08-13 13:09:45 UTC (rev 52656)
@@ -4,6 +4,7 @@
 include $(MODULE_TOPDIR)/include/Make/Vars.make
 include $(MODULE_TOPDIR)/include/Make/Rules.make
 include $(MODULE_TOPDIR)/include/Make/Html.make
+include $(MODULE_TOPDIR)/include/Make/Rest.make
 
 # don't install *.png, *.jpg for directories
 # to prevent problems with r.out.png etc
@@ -40,6 +41,8 @@
 
 htmldir: html
 
+restdir: rest
+
 .PHONY: subdirs parsubdirs htmldir $(SUBDIRS)
 
 parsubdirs: $(SUBDIRS)

Modified: grass/trunk/include/Make/Docs.make
===================================================================
--- grass/trunk/include/Make/Docs.make	2012-08-13 11:54:28 UTC (rev 52655)
+++ grass/trunk/include/Make/Docs.make	2012-08-13 13:09:45 UTC (rev 52656)
@@ -102,5 +102,23 @@
 	fi
 	sh svn2cl ./ChangeLog
 
+rest_dirs = \
+	db \
+	general \
+	imagery \
+	ps \
+	raster \
+	raster3d \
+	scripts \
+	temporal \
+	vector \
+	
+restdocs:
+	$(MAKE)
+	$(MKDIR) $(RESTDIR)
+	for dir in $(rest_dirs) ; do \
+	  $(MAKE) -C $$dir rest ; \
+	  done
+	
 .PHONY: htmldocs-single htmldocs packagehtmldocs pdfdocs cleandocs html2pdfdoc
 .PHONY: html2pdfdoccomplete changelog

Modified: grass/trunk/include/Make/Etc.make
===================================================================
--- grass/trunk/include/Make/Etc.make	2012-08-13 11:54:28 UTC (rev 52655)
+++ grass/trunk/include/Make/Etc.make	2012-08-13 13:09:45 UTC (rev 52656)
@@ -9,8 +9,9 @@
 include $(MODULE_TOPDIR)/include/Make/Rules.make
 include $(MODULE_TOPDIR)/include/Make/Html.make
 include $(MODULE_TOPDIR)/include/Make/Compile.make
+include $(MODULE_TOPDIR)/include/Make/Rest.make
 
-etc: $(ETC)/$(PGM)$(EXE) html
+etc: $(ETC)/$(PGM)$(EXE) html rest
 
 $(ETC)/$(PGM)$(EXE): $(ARCH_OBJS) $(DEPENDENCIES)
 	$(call linker)

Modified: grass/trunk/include/Make/Grass.make
===================================================================
--- grass/trunk/include/Make/Grass.make	2012-08-13 11:54:28 UTC (rev 52655)
+++ grass/trunk/include/Make/Grass.make	2012-08-13 13:09:45 UTC (rev 52656)
@@ -56,6 +56,7 @@
 DBDRIVERDIR     = $(ARCH_DISTDIR)/driver/db
 DOCSDIR         = $(ARCH_DISTDIR)/docs
 HTMLDIR         = $(ARCH_DISTDIR)/docs/html
+RESTDIR         = $(ARCH_DISTDIR)/docs/rest
 SCRIPTDIR       = $(ARCH_DISTDIR)/scripts
 MSG_DIR         = $(ARCH_DISTDIR)/etc/msgs
 MO_DIR          = $(ARCH_DISTDIR)/locale

Modified: grass/trunk/include/Make/Lib.make
===================================================================
--- grass/trunk/include/Make/Lib.make	2012-08-13 11:54:28 UTC (rev 52655)
+++ grass/trunk/include/Make/Lib.make	2012-08-13 13:09:45 UTC (rev 52656)
@@ -8,6 +8,7 @@
 include $(MODULE_TOPDIR)/include/Make/Rules.make
 include $(MODULE_TOPDIR)/include/Make/Html.make
 include $(MODULE_TOPDIR)/include/Make/Compile.make
+include $(MODULE_TOPDIR)/include/Make/Rest.make
 
 ifneq ($(LIB),)
 LIB_NAME := $($(LIB)_LIBNAME)
@@ -24,3 +25,6 @@
 
 lib: $(GRASS_LIBRARY_TYPE)
 	if [ "$(PGM)" != "" -a -f "$(PGM)".html ] ; then $(MAKE) html ; fi
+	
+lib: $(GRASS_LIBRARY_TYPE)
+	if [ "$(PGM)" != "" -a -f "$(PGM)".html ] ; then $(MAKE) rest ; fi

Modified: grass/trunk/include/Make/Module.make
===================================================================
--- grass/trunk/include/Make/Module.make	2012-08-13 11:54:28 UTC (rev 52655)
+++ grass/trunk/include/Make/Module.make	2012-08-13 13:09:45 UTC (rev 52656)
@@ -9,9 +9,12 @@
 include $(MODULE_TOPDIR)/include/Make/Rules.make
 include $(MODULE_TOPDIR)/include/Make/Html.make
 include $(MODULE_TOPDIR)/include/Make/Compile.make
+include $(MODULE_TOPDIR)/include/Make/Rest.make
 
-cmd: $(BIN)/$(PGM)$(EXE) html
+cmd: $(BIN)/$(PGM)$(EXE) html restdocs
 
+restdocs: $(BIN)/$(PGM)$(EXE) rest
+
 $(BIN)/$(PGM)$(EXE): $(ARCH_OBJS) $(DEPENDENCIES)
 	$(call linker)
 

Modified: grass/trunk/include/Make/Multi.make
===================================================================
--- grass/trunk/include/Make/Multi.make	2012-08-13 11:54:28 UTC (rev 52655)
+++ grass/trunk/include/Make/Multi.make	2012-08-13 13:09:45 UTC (rev 52656)
@@ -5,6 +5,7 @@
 include $(MODULE_TOPDIR)/include/Make/Rules.make
 include $(MODULE_TOPDIR)/include/Make/Html.make
 include $(MODULE_TOPDIR)/include/Make/Compile.make
+include $(MODULE_TOPDIR)/include/Make/Rest.make
 
 PROGFILES = $(patsubst %,$(BIN)/%$(EXE),$(PROGRAMS))
 HTMLFILES = $(patsubst %,$(HTMLDIR)/%.html,$(PROGRAMS))

Added: grass/trunk/include/Make/NoRest.make
===================================================================
--- grass/trunk/include/Make/NoRest.make	                        (rev 0)
+++ grass/trunk/include/Make/NoRest.make	2012-08-13 13:09:45 UTC (rev 52656)
@@ -0,0 +1,3 @@
+
+$(RESTDIR)/$(PGM).txt:
+	@echo no REST documentation available

Modified: grass/trunk/include/Make/Other.make
===================================================================
--- grass/trunk/include/Make/Other.make	2012-08-13 11:54:28 UTC (rev 52655)
+++ grass/trunk/include/Make/Other.make	2012-08-13 13:09:45 UTC (rev 52656)
@@ -1,4 +1,5 @@
 include $(MODULE_TOPDIR)/include/Make/Vars.make
 include $(MODULE_TOPDIR)/include/Make/Rules.make
 include $(MODULE_TOPDIR)/include/Make/Html.make
+include $(MODULE_TOPDIR)/include/Make/Rest.make
 

Added: grass/trunk/include/Make/Rest.make
===================================================================
--- grass/trunk/include/Make/Rest.make	                        (rev 0)
+++ grass/trunk/include/Make/Rest.make	2012-08-13 13:09:45 UTC (rev 52656)
@@ -0,0 +1,38 @@
+
+# generic rest rules for all commands
+
+ifdef CROSS_COMPILING
+
+rest:
+
+else
+
+#check for program
+checkpandoc:
+	@(type pandoc > /dev/null || (echo "ERROR: Install 'pandoc' software first (get from http://johnmacfarlane.net/pandoc/)" && exit 1))
+
+restdesc = $(call run_grass,$(1) --rest-description < /dev/null > $(2)) || exit 0
+
+IMGSRC := $(wildcard *.png) $(wildcard *.jpg)
+IMGDST := $(patsubst %,$(RESTDIR)/%,$(IMGSRC))
+
+$(RESTDIR)/%.txt: %.html %.tmp.txt $(HTMLSRC) $(IMGDST) | $(RESTDIR)
+	$(PYTHON) $(GISBASE)/tools/mkrest.py $* $(GRASS_VERSION_DATE) > $@;
+ifneq ($(strip $(IMGDST)),)
+.SECONDARY: $(IMGDST)
+endif
+
+$(RESTDIR)/%.png: %.png | $(RESTDIR)
+	$(INSTALL_DATA) $< $@
+
+$(RESTDIR)/%.jpg: %.jpg | $(RESTDIR)
+	$(INSTALL_DATA) $< $@
+
+%.tmp.txt: $(HTMLSRC)
+	if [ "$(HTMLSRC)" != "" ] ; then $(call restdesc,$<,$@) ; fi
+
+rest: $(RESTDIR)/$(PGM).txt # checkpandoc
+
+endif
+
+.PHONY: rest

Modified: grass/trunk/include/Make/Rules.make
===================================================================
--- grass/trunk/include/Make/Rules.make	2012-08-13 11:54:28 UTC (rev 52655)
+++ grass/trunk/include/Make/Rules.make	2012-08-13 13:09:45 UTC (rev 52656)
@@ -6,7 +6,7 @@
 ARCH_DIRS = $(ARCH_DISTDIR) $(ARCH_BINDIR) $(ARCH_INCDIR) $(ARCH_LIBDIR) \
 	$(BIN) $(ETC) \
 	$(DRIVERDIR) $(DBDRIVERDIR) $(FONTDIR) $(DOCSDIR) $(HTMLDIR) \
-	$(MANBASEDIR) $(MANDIR) $(TOOLSDIR)
+	$(MANBASEDIR) $(MANDIR) $(TOOLSDIR) $(RESTDIR)
 
 pre: | $(ARCH_DIRS)
 

Modified: grass/trunk/include/Make/Script.make
===================================================================
--- grass/trunk/include/Make/Script.make	2012-08-13 11:54:28 UTC (rev 52655)
+++ grass/trunk/include/Make/Script.make	2012-08-13 13:09:45 UTC (rev 52656)
@@ -12,8 +12,9 @@
 include $(MODULE_TOPDIR)/include/Make/Rules.make
 include $(MODULE_TOPDIR)/include/Make/Html.make
 include $(MODULE_TOPDIR)/include/Make/ScriptRules.make
+include $(MODULE_TOPDIR)/include/Make/Rest.make
 
-SCRIPT_ACTIONS = $(SCRIPT) html scriptstrings
+SCRIPT_ACTIONS = $(SCRIPT) html scriptstrings rest
 
 script: $(SCRIPT_ACTIONS)
 
@@ -22,6 +23,7 @@
 install:
 	$(INSTALL) $(SCRIPT) $(INST_DIR)/scripts/
 	$(INSTALL_DATA) $(HTMLDIR)/$(PGM).html $(INST_DIR)/docs/html/
+	$(INSTALL_DATA) $(HTMLDIR)/$(PGM).txt $(INST_DIR)/docs/rest/
 	$(INSTALL_DATA) $(ARCH_DISTDIR)/docs/man/man1/$(PGM).1 $(INST_DIR)/docs/man/man1/
 	if [ -d "$(ETC)/$(PGM)" ] ; then \
 		cp -rL $(ETC)/$(PGM) $(INST_DIR)/etc/ ; \

Modified: grass/trunk/lib/gtcltk/Makefile
===================================================================
--- grass/trunk/lib/gtcltk/Makefile	2012-08-13 11:54:28 UTC (rev 52655)
+++ grass/trunk/lib/gtcltk/Makefile	2012-08-13 13:09:45 UTC (rev 52656)
@@ -3,6 +3,7 @@
 PGM=grocat
 include $(MODULE_TOPDIR)/include/Make/Etc.make
 include $(MODULE_TOPDIR)/include/Make/NoHtml.make
+include $(MODULE_TOPDIR)/include/Make/NoRest.make
 
 TCLSRC := $(wildcard *.tcl)
 TCLDST := $(patsubst %.tcl,$(ETC)/gtcltk/%.tcl,$(TCLSRC))

Modified: grass/trunk/lib/vector/Makefile
===================================================================
--- grass/trunk/lib/vector/Makefile	2012-08-13 11:54:28 UTC (rev 52655)
+++ grass/trunk/lib/vector/Makefile	2012-08-13 13:09:45 UTC (rev 52656)
@@ -18,6 +18,10 @@
 
 htmldir: parsubdirs
 
+restdocs: restdir
+
+restdir: parsubdirs
+
 diglib: rtree
 
 Vlib: rtree dglib diglib

Modified: grass/trunk/man/Makefile
===================================================================
--- grass/trunk/man/Makefile	2012-08-13 11:54:28 UTC (rev 52655)
+++ grass/trunk/man/Makefile	2012-08-13 13:09:45 UTC (rev 52656)
@@ -11,6 +11,16 @@
 	$(HTMLDIR)/nviz/grassdocs.css \
 	$(HTMLDIR)/nviz/grass_logo.png
 
+DSTFILES_REST := \
+	$(RESTDIR)/grassdocs.css \
+	$(RESTDIR)/grass_logo.png \
+	$(RESTDIR)/grass_icon.png \
+	$(RESTDIR)/nviz/grassdocs.css \
+	$(RESTDIR)/nviz/grass_logo.png \
+	$(RESTDIR)/conf.py \
+	$(RESTDIR)/make.bat \
+	$(RESTDIR)/Makefile \
+
 categories = \
 	d:display \
 	db:database \
@@ -29,14 +39,22 @@
 
 INDICES := $(patsubst %,$(HTMLDIR)/%.html,$(IDXSRC))
 
+INDICES_REST := $(patsubst %,$(RESTDIR)/%.txt,$(IDXSRC))
+
 ALL_HTML := $(wildcard $(HTMLDIR)/*.*.html)
 
+ALL_REST := $(wildcard $(RESTDIR)/*.*.txt)
+
 default: $(DSTFILES)
 	@echo "Generating HTML manual pages index (help system)..."
 	$(MAKE) $(INDICES)
 	$(call build,check)
 	$(MAKE) manpages
+	$(MAKE) restdocs
 
+restdocs: $(DSTFILES_REST)
+	  $(MAKE) $(INDICES_REST)
+
 # This must be a separate target so that evaluation of $(MANPAGES)
 # is delayed until the indices have been generated
 manpages:
@@ -48,18 +66,33 @@
 GISBASE="$(RUN_GISBASE)" ARCH="$(ARCH)" ARCH_DISTDIR="$(ARCH_DISTDIR)" $(PYTHON) ./build_$(1).py $(2)
 endef
 
+define build_rest
+GISBASE="$(RUN_GISBASE)" ARCH="$(ARCH)" ARCH_DISTDIR="$(ARCH_DISTDIR)" $(PYTHON) ./build_$(1)_rest.py $(2)
+endef
+
 $(HTMLDIR)/full_index.html: $(ALL_HTML) build_full_index.py build_html.py
 	$(call build,full_index)
 	touch $@
 
+$(RESTDIR)/full_index.txt: $(ALL_REST) build_full_index_rest.py build_rest.py
+	$(call build_rest,full_index)
+	touch $@	
+	
 $(HTMLDIR)/index.html: build_index.py build_html.py
 	$(call build,index)
 	touch $@
 
+$(RESTDIR)/index.txt: build_index_rest.py build_rest.py
+	$(call build_rest,index)
+	touch $@	
+	
 define category_rule
 $$(HTMLDIR)/$(2).html: $$(wildcard $$(HTMLDIR)/$(1).*.html) build_class.py build_html.py
 	$$(call build,class,$(1) $(2))
 	touch $$@
+$$(RESTDIR)/$(2).txt: $$(wildcard $$(RESTDIR)/$(1).*.txt) build_class_rest.py build_rest.py
+	$$(call build_rest,class,$(1) $(2))
+	touch $$@
 endef
 
 $(foreach cat,$(categories),$(eval $(call category_rule,$(firstword $(subst :, ,$(cat))),$(lastword $(subst :, ,$(cat))))))
@@ -82,3 +115,30 @@
 $(HTMLDIR)/nviz:
 	$(MKDIR) $@
 
+$(RESTDIR)/grassdocs.css: grassdocs.css
+	$(INSTALL_DATA) $< $@
+
+$(RESTDIR)/nviz/grassdocs.css: grassdocs.css | $(RESTDIR)/nviz
+	$(INSTALL_DATA) $< $@
+
+$(RESTDIR)/grass_logo.png: grass_logo.png
+	$(INSTALL_DATA) $< $@
+
+$(RESTDIR)/nviz/grass_logo.png: grass_logo.png | $(RESTDIR)/nviz
+	$(INSTALL_DATA) $< $@
+
+$(RESTDIR)/grass_icon.png: grass_icon.png
+	$(INSTALL_DATA) $< $@
+
+$(RESTDIR)/conf.py: sphinx/conf.py
+	$(INSTALL_DATA) $< $@
+
+$(RESTDIR)/make.bat: sphinx/make.bat
+	$(INSTALL_DATA) $< $@
+
+$(RESTDIR)/Makefile: sphinx/Makefile
+	$(INSTALL_DATA) $< $@
+	
+$(RESTDIR)/nviz:
+	$(MKDIR) $@
+

Added: grass/trunk/man/build_check_rest.py
===================================================================
--- grass/trunk/man/build_check_rest.py	                        (rev 0)
+++ grass/trunk/man/build_check_rest.py	2012-08-13 13:09:45 UTC (rev 52656)
@@ -0,0 +1,22 @@
+#!/usr/bin/env python
+
+# checks for HTML files missing DESCRIPTION section
+# (c) The GRASS Development Team, Markus Neteler, Glynn Clements 2003, 2004, 2005, 2006, 2009
+
+import sys
+import os
+import string
+
+from build_rest import *
+
+os.chdir(rest_dir)
+
+sys.stdout.write(message_tmpl.substitute(rest_dir = rest_dir))
+
+for cmd in rest_files('*'):
+    if "DESCRIPTION" not in read_file(cmd):
+	sys.stdout.write("%s\n" % cmd[:-5])
+
+sys.stdout.write(r"""
+----------------------------------------------------------------------
+""")

Added: grass/trunk/man/build_class_rest.py
===================================================================
--- grass/trunk/man/build_class_rest.py	                        (rev 0)
+++ grass/trunk/man/build_class_rest.py	2012-08-13 13:09:45 UTC (rev 52656)
@@ -0,0 +1,41 @@
+#!/usr/bin/env python
+
+# generates REST man pages docs/rest/<category>.txt
+# (c) The GRASS Development Team, Markus Neteler, Glynn Clements 2003, 2004, 2005, 2006, 2009
+
+import sys
+import os
+import string
+
+from build_rest import *
+
+os.chdir(rest_dir)
+
+#write separate module pages:
+
+#for all module groups:
+cls = sys.argv[1]
+modclass = sys.argv[2]
+
+filename = modclass + ".txt"
+
+f = open(filename + ".tmp", 'wb')
+
+write_rest_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:
+for cmd in rest_files(cls):
+    basename = os.path.splitext(cmd)[0]
+    desc = check_for_desc_override(basename)
+    if desc is None:
+        desc = get_desc(cmd)
+    f.write(desc2_tmpl.substitute(basename = basename,
+    			      desc = desc))
+
+write_rest_footer(f, "index.txt")
+
+f.close()
+replace_file(filename)

Added: grass/trunk/man/build_full_index_rest.py
===================================================================
--- grass/trunk/man/build_full_index_rest.py	                        (rev 0)
+++ grass/trunk/man/build_full_index_rest.py	2012-08-13 13:09:45 UTC (rev 52656)
@@ -0,0 +1,54 @@
+#!/usr/bin/env python
+
+# generates docs/rest/full_index.txt
+# (c) The GRASS Development Team, Markus Neteler, Glynn Clements 2003, 2004, 2005, 2006, 2009
+
+import sys
+import os
+import string
+
+from build_rest import *
+
+os.chdir(rest_dir)
+
+classes = []
+for cmd in rest_files('*'):
+    prefix = cmd.split('.')[0]
+    if prefix not in classes:
+	classes.append(prefix)
+classes.sort()
+
+#begin full index:
+filename = "full_index.txt"
+f = open(filename + ".tmp", 'wb')
+
+write_rest_header(f, "GRASS GIS %s Reference Manual: Full index" % grass_version)
+
+#generate main index of all modules:
+f.write(full_index_header)
+#"
+
+#for cls in classes:
+    #f.write(cmd1_tmpl.substitute(cmd = cls))
+    #if cls != classes[-1]:
+	#f.write(" | ")
+
+f.write(sections)
+
+#for all module groups:
+for cls in classes:
+    f.write(cmd2_tmpl.substitute(cmd = cls))
+    #for all modules:  
+    for cmd in rest_files(cls):
+	basename = os.path.splitext(cmd)[0]
+	desc = check_for_desc_override(basename)
+	if desc is None:
+	    desc = get_desc(cmd)
+	f.write(desc1_tmpl.substitute(basename = basename,
+				      desc = desc))
+    f.write("\n")
+
+write_rest_footer(f, "index.txt")
+
+f.close()
+replace_file(filename)

Added: grass/trunk/man/build_index_rest.py
===================================================================
--- grass/trunk/man/build_index_rest.py	                        (rev 0)
+++ grass/trunk/man/build_index_rest.py	2012-08-13 13:09:45 UTC (rev 52656)
@@ -0,0 +1,22 @@
+#!/usr/bin/env python
+
+# generates docs/rest/index.txt
+# (c) The GRASS Development Team, Markus Neteler, Glynn Clements 2003, 2004, 2005, 2006, 2009, Luca Delucchi 2012
+
+import sys
+import os
+import string
+
+from build_rest import *
+
+os.chdir(rest_dir)
+
+filename = "index.txt"
+f = open(filename + ".tmp", 'wb')
+
+write_rest_header(f, "GRASS GIS %s Reference Manual" % grass_version, True)
+write_rest_cmd_overview(f)
+write_rest_footer(f, "index.txt")
+
+f.close()
+replace_file(filename)

Added: grass/trunk/man/build_rest.py
===================================================================
--- grass/trunk/man/build_rest.py	                        (rev 0)
+++ grass/trunk/man/build_rest.py	2012-08-13 13:09:45 UTC (rev 52656)
@@ -0,0 +1,357 @@
+#!/usr/bin/env python
+
+"""
+Created on Thu Aug  9 14:04:12 2012
+
+ at author: lucadelu
+"""
+# utilities for generating REST indices
+# utilities for generating HTML indices
+# (c) 2003-2006, 2009-2012 by the GRASS Development Team, Markus Neteler, Glynn Clements, Luca Delucchi
+
+import sys
+import os
+import string
+
+## TODO: better fix this in include/Make/Rest.make, see bug RT #5361
+
+# exclude following list of modules from help index:
+
+exclude_mods = [
+    "i.find",
+    "r.watershed.ram",
+    "r.watershed.seg",
+    "v.topo.check",
+    "helptext.html"]
+
+# these modules don't use G_parser()
+
+desc_override = {
+    "g.parser": "Provides automated parser, GUI, and help support for GRASS scipts.",
+    "r.li.daemon": "Support module for r.li landscape index calculations."
+    }
+
+############################################################################
+
+header2_tmpl = string.Template(\
+r"""
+==================================================================
+GRASS GIS ${grass_version} Reference Manual
+==================================================================
+.. figure:: grass_logo.png
+   :align: center
+   :alt: GRASS logo
+
+GRASS GIS ${grass_version} Reference Manual
+--------------------------------------------------------------------
+
+**Geographic Resources Analysis Support System**, commonly
+referred to as `GRASS <http://grass.osgeo.org>`_, is a `Geographic
+Information System <http://en.wikipedia.org/wiki/Geographic_information_system>`_ 
+(GIS) used for geospatial data management and analysis, image processing, 
+graphics/maps production, spatial modeling, and visualization. GRASS is 
+currently used in academic and commercial settings around the world, as 
+well as by many governmental agencies and environmental consulting companies.
+
+This reference manual details the use of modules distributed with
+Geographic Resources Analysis Support System (GRASS), an open source
+(`GNU GPLed <http://www.gnu.org/licenses/gpl.html>`_), image
+processing and geographic information system (GIS).
+""")
+
+overview_tmpl = string.Template(\
+r"""
+Quick Introduction
+~~~~~~~~~~~~~~~~~~~~
+
+.. toctree::
+    :maxdepth: 1
+
+	How to start with GRASS <helptext.html>
+        Intro projections and spatial transformations <projectionintro>
+        Intro 2D raster map processing <rasterintro>
+        Intro 3D raster map (voxel) processing <raster3dintro>
+        Intro image processing <imageryintro>
+        Intro vector map processing and network analysis <vectorintro>
+        Intro database management <databaseintro>
+        Intro temporal data processing <temporalintro>
+
+Display/Graphical User Interfaces
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.. toctree::
+    :maxdepth: 1
+        
+        wxGUI wxPython-based GUI frontend <wxGUI>
+        Display commands manual <display>
+        Display drivers <displaydrivers>
+        nviz 3D visualization and animation tool <nviz>
+        xganim tool for animating a raster map series <xganim>
+
+
+Raster and 3D raster processing
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+.. toctree::
+    :maxdepth: 1
+    
+        Raster commands manual <raster>
+        3D raster (voxel) commands manual <raster3D>
+
+Image processing
+~~~~~~~~~~~~~~~~~~
+
+.. toctree::
+    :maxdepth: 1
+    
+         Imagery commands manual <imagery>
+         
+         
+
+Vector processing
+~~~~~~~~~~~~~~~~~~
+
+.. toctree::
+    :maxdepth: 1
+    
+        Vector commands manual <vector>
+        GRASS ASCII vector format specification <vectorascii>
+        
+Database
+~~~~~~~~~
+
+.. toctree::
+    :maxdepth: 1
+    
+        SQL support in GRASS GIS <sql>
+        Database commands manual <database>
+
+General
+~~~~~~~~~
+
+.. toctree::
+    :maxdepth: 1
+    
+        GRASS startup manual page <grass7>
+        General commands manual <general>
+
+Miscellaneous & Variables
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+.. toctree::
+    :maxdepth: 1
+    
+        Miscellaneous commands manual <misc>
+        GRASS variables and environment variables <variables>
+
+Temporal processing
+~~~~~~~~~~~~~~~~~~~~
+
+.. toctree::
+    :maxdepth: 1
+    
+        Temporal commands manual <temporal>
+
+Printing
+~~~~~~~~~~~~
+
+.. toctree::
+    :maxdepth: 1
+    
+        Postscript commands manual <postscript>
+
+""")
+
+#TODO add copyright symbol
+footer_tmpl = string.Template(\
+r"""
+
+--------------
+
+:doc:`Help Index <index>` \| :doc:`Full Index <full_index>`
+ 2003-2012 `GRASS Development Team <http://grass.osgeo.org>`_, GRASS GIS ${grass_version} Reference Manual
+""")
+
+cmd1_tmpl = string.Template(\
+r"""*`$cmd.\* <${cmd}>` *""")
+
+cmd2_tmpl = string.Template(\
+r"""
+
+${cmd}.* commands:
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+.. toctree::
+    :maxdepth: 1
+    
+
+""")
+
+desc1_tmpl = string.Template(\
+r"""        ${basename} - ${desc} <${basename}>
+""")
+
+sections = \
+r""" 
+
++-----------------------------+-------------------------------+
+|`d.* <full_index.html#d>`_   | `display commands`            |
++-----------------------------+-------------------------------+
+|`db.* <full_index.html#db>`_ | `database commands`           |
++-----------------------------+-------------------------------+
+|`g.* <full_index.html#g>`_   | `general commands`            |
++-----------------------------+-------------------------------+
+|`i.* <full_index.html#i>`_   | `imagery commands`            |
++-----------------------------+-------------------------------+
+|`m.* <full_index.html#m>`_   | `miscellaneous commands`      |
++-----------------------------+-------------------------------+
+|`ps.* <full_index.html#ps>`_ | `postscript commands`         |
++-----------------------------+-------------------------------+
+|`r.* <full_index.html#r>`_   | `raster commands`             |
++-----------------------------+-------------------------------+
+|`r3.* <full_index.html#r3>`_ | `raster3D commands`           |
++-----------------------------+-------------------------------+
+|`t.* <full_index.html#t>`_   | `temporal commands`           |
++-----------------------------+-------------------------------+
+|`v.* <full_index.html#v>`_   | `vector commands`             |
++-----------------------------+-------------------------------+
+|`nviz <nviz.html>`_          | `visualization suite`         |
++-----------------------------+-------------------------------+
+|`wxGUI <wxGUI.html>`_        | `wxPython-based GUI frontend` |
++-----------------------------+-------------------------------+
+|`xganim <xganim.html>`_      | `raster map slideshow`        |
++-----------------------------+-------------------------------+
+
+"""
+
+modclass_intro_tmpl = string.Template(\
+r"""Go to :doc:`${modclass} introduction <${modclass_lower}intro>`
+""")
+#"
+
+modclass_tmpl = string.Template(\
+r"""Go :doc:`back to help overview<index>`
+
+
+
+**${modclass} commands:**
+
+.. toctree::
+    :maxdepth: 1
+    
+
+""")
+#"
+
+desc2_tmpl = string.Template(\
+r"""        ${basename} - ${desc} <${basename}>
+""")
+#"
+
+
+full_index_header = \
+r"""Go :doc:`back to help overview<index>`
+
+
+Full command index:
+~~~~~~~~~~~~~~~~~~~~
+"""
+#"
+
+
+message_tmpl = string.Template(\
+r"""Generated HTML docs in ${rest_dir}/index.txt
+----------------------------------------------------------------------
+Following modules are missing the 'description.txt' file in src code:
+""")
+
+def check_for_desc_override(basename):
+    return desc_override.get(basename)
+
+def read_file(name):
+    f = open(name, 'rb')
+    s = f.read()
+    f.close()
+    return s
+
+def write_file(name, contents):
+    f = open(name, 'wb')
+    f.write(contents)
+    f.close()
+
+def try_mkdir(path):
+    try:
+        os.mkdir(path)
+    except OSError, e:
+        pass
+
+def replace_file(name):
+    temp = name + ".tmp"
+    if os.path.exists(name) and os.path.exists(temp) and read_file(name) == read_file(temp):
+        os.remove(temp)
+    else:
+        try:
+            os.remove(name)
+        except OSError, e:
+            pass
+        os.rename(temp, name)
+
+def copy_file(src, dst):
+    write_file(dst, read_file(src))
+
+def rest_files(cls = None):
+    for cmd in sorted(os.listdir(rest_dir)):
+        if cmd.endswith(".txt") and \
+           (cls in [None, '*'] or cmd.startswith(cls + ".")) and \
+           (cls != '*' or len(cmd.split('.')) >= 3) and \
+           cmd not in ["full_index.txt", "index.txt"] and \
+           cmd not in exclude_mods and \
+           not cmd.startswith("wxGUI."):
+            yield cmd
+
+def write_rest_header(f, title, ismain = False):
+    f.write(header2_tmpl.substitute(grass_version = grass_version))
+
+def write_rest_cmd_overview(f):
+    box_color = "#e1ecd0"
+    f.write(overview_tmpl.substitute(box_color = box_color))
+
+def write_rest_footer(f, index_url):
+    f.write(footer_tmpl.substitute(grass_version = grass_version,
+                                   index_url = index_url))
+
+def get_desc(cmd):
+    f = open(cmd, 'r')
+    while True:
+        line = f.readline()
+        if not line:
+            return ""
+        if "NAME" in line:
+            break
+
+    while True:
+        line = f.readline()
+        if not line:
+            return ""
+        if "SYNOPSIS" in line:
+            break
+        if "*" in line:
+            sp = line.split('-',1)
+            if len(sp) > 1:
+                return sp[1].strip()
+            else:
+                return None
+
+    return ""
+
+############################################################################
+
+arch_dist_dir = os.environ['ARCH_DISTDIR']
+rest_dir = os.path.join(arch_dist_dir, "docs", "rest")
+gisbase = os.environ['GISBASE']
+ver = read_file(os.path.join(gisbase, "etc", "VERSIONNUMBER"))
+try:
+    grass_version = ver.split()[0].strip()
+except IndexError:
+    grass_version = ver.split().strip()
+
+############################################################################

Added: grass/trunk/man/sphinx/Makefile
===================================================================
--- grass/trunk/man/sphinx/Makefile	                        (rev 0)
+++ grass/trunk/man/sphinx/Makefile	2012-08-13 13:09:45 UTC (rev 52656)
@@ -0,0 +1,153 @@
+# Makefile for Sphinx documentation
+#
+
+# You can set these variables from the command line.
+SPHINXOPTS    =
+SPHINXBUILD   = sphinx-build
+PAPER         =
+BUILDDIR      = _build
+
+# Internal variables.
+PAPEROPT_a4     = -D latex_paper_size=a4
+PAPEROPT_letter = -D latex_paper_size=letter
+ALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+# the i18n builder cannot share the environment and doctrees with the others
+I18NSPHINXOPTS  = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+
+.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
+
+help:
+	@echo "Please use \`make <target>' where <target> is one of"
+	@echo "  html       to make standalone HTML files"
+	@echo "  dirhtml    to make HTML files named index.html in directories"
+	@echo "  singlehtml to make a single large HTML file"
+	@echo "  pickle     to make pickle files"
+	@echo "  json       to make JSON files"
+	@echo "  htmlhelp   to make HTML files and a HTML help project"
+	@echo "  qthelp     to make HTML files and a qthelp project"
+	@echo "  devhelp    to make HTML files and a Devhelp project"
+	@echo "  epub       to make an epub"
+	@echo "  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
+	@echo "  latexpdf   to make LaTeX files and run them through pdflatex"
+	@echo "  text       to make text files"
+	@echo "  man        to make manual pages"
+	@echo "  texinfo    to make Texinfo files"
+	@echo "  info       to make Texinfo files and run them through makeinfo"
+	@echo "  gettext    to make PO message catalogs"
+	@echo "  changes    to make an overview of all changed/added/deprecated items"
+	@echo "  linkcheck  to check all external links for integrity"
+	@echo "  doctest    to run all doctests embedded in the documentation (if enabled)"
+
+clean:
+	-rm -rf $(BUILDDIR)/*
+
+html:
+	$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
+	@echo
+	@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
+
+dirhtml:
+	$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
+	@echo
+	@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
+
+singlehtml:
+	$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
+	@echo
+	@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
+
+pickle:
+	$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
+	@echo
+	@echo "Build finished; now you can process the pickle files."
+
+json:
+	$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
+	@echo
+	@echo "Build finished; now you can process the JSON files."
+
+htmlhelp:
+	$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
+	@echo
+	@echo "Build finished; now you can run HTML Help Workshop with the" \
+	      ".hhp project file in $(BUILDDIR)/htmlhelp."
+
+qthelp:
+	$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
+	@echo
+	@echo "Build finished; now you can run "qcollectiongenerator" with the" \
+	      ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
+	@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/GRASS70Documentation.qhcp"
+	@echo "To view the help file:"
+	@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/GRASS70Documentation.qhc"
+
+devhelp:
+	$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
+	@echo
+	@echo "Build finished."
+	@echo "To view the help file:"
+	@echo "# mkdir -p $$HOME/.local/share/devhelp/GRASS70Documentation"
+	@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/GRASS70Documentation"
+	@echo "# devhelp"
+
+epub:
+	$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
+	@echo
+	@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
+
+latex:
+	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+	@echo
+	@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
+	@echo "Run \`make' in that directory to run these through (pdf)latex" \
+	      "(use \`make latexpdf' here to do that automatically)."
+
+latexpdf:
+	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+	@echo "Running LaTeX files through pdflatex..."
+	$(MAKE) -C $(BUILDDIR)/latex all-pdf
+	@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
+
+text:
+	$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
+	@echo
+	@echo "Build finished. The text files are in $(BUILDDIR)/text."
+
+man:
+	$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
+	@echo
+	@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
+
+texinfo:
+	$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
+	@echo
+	@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
+	@echo "Run \`make' in that directory to run these through makeinfo" \
+	      "(use \`make info' here to do that automatically)."
+
+info:
+	$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
+	@echo "Running Texinfo files through makeinfo..."
+	make -C $(BUILDDIR)/texinfo info
+	@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
+
+gettext:
+	$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
+	@echo
+	@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
+
+changes:
+	$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
+	@echo
+	@echo "The overview file is in $(BUILDDIR)/changes."
+
+linkcheck:
+	$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
+	@echo
+	@echo "Link check complete; look for any errors in the above output " \
+	      "or in $(BUILDDIR)/linkcheck/output.txt."
+
+doctest:
+	$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
+	@echo "Testing of doctests in the sources finished, look at the " \
+	      "results in $(BUILDDIR)/doctest/output.txt."

Added: grass/trunk/man/sphinx/conf.py
===================================================================
--- grass/trunk/man/sphinx/conf.py	                        (rev 0)
+++ grass/trunk/man/sphinx/conf.py	2012-08-13 13:09:45 UTC (rev 52656)
@@ -0,0 +1,285 @@
+# -*- coding: utf-8 -*-
+#
+# GRASS 7.0 Documentation documentation build configuration file, created by
+# sphinx-quickstart on Thu Aug  9 17:16:28 2012.
+#
+# This file is execfile()d with the current directory set to its containing dir.
+#
+# Note that not all possible configuration values are present in this
+# autogenerated file.
+#
+# All configuration values have a default; values that are commented out
+# serve to show the default.
+
+import sys, os
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+#sys.path.insert(0, os.path.abspath('.'))
+
+# -- General configuration -----------------------------------------------------
+
+# If your documentation needs a minimal Sphinx version, state it here.
+#needs_sphinx = '1.0'
+
+# Add any Sphinx extension module names here, as strings. They can be extensions
+# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
+extensions = ['sphinx.ext.todo', 'sphinx.ext.pngmath']
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# The suffix of source filenames.
+source_suffix = '.txt'
+
+# The encoding of source files.
+#source_encoding = 'utf-8-sig'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General information about the project.
+project = u'GRASS 7.0 Documentation'
+copyright = u'2012, GRASS Development Team'
+
+# The version info for the project you're documenting, acts as replacement for
+# |version| and |release|, also used in various other places throughout the
+# built documents.
+#
+# The short X.Y version.
+version = '7.0'
+# The full version, including alpha/beta/rc tags.
+release = 'svn'
+
+# The language for content autogenerated by Sphinx. Refer to documentation
+# for a list of supported languages.
+#language = None
+
+# There are two options for replacing |today|: either, you set today to some
+# non-false value, then it is used:
+#today = ''
+# Else, today_fmt is used as the format for a strftime call.
+#today_fmt = '%B %d, %Y'
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+exclude_patterns = ['_build']
+
+# The reST default role (used for this markup: `text`) to use for all documents.
+#default_role = None
+
+# If true, '()' will be appended to :func: etc. cross-reference text.
+#add_function_parentheses = True
+
+# If true, the current module name will be prepended to all description
+# unit titles (such as .. function::).
+#add_module_names = True
+
+# If true, sectionauthor and moduleauthor directives will be shown in the
+# output. They are ignored by default.
+#show_authors = False
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+# A list of ignored prefixes for module index sorting.
+#modindex_common_prefix = []
+
+
+# -- Options for HTML output ---------------------------------------------------
+
+# The theme to use for HTML and HTML Help pages.  See the documentation for
+# a list of builtin themes.
+html_theme = 'default'
+
+# Theme options are theme-specific and customize the look and feel of a theme
+# further.  For a list of options available for each theme, see the
+# documentation.
+#html_theme_options = {}
+
+# Add any paths that contain custom themes here, relative to this directory.
+#html_theme_path = []
+
+# The name for this set of Sphinx documents.  If None, it defaults to
+# "<project> v<release> documentation".
+#html_title = None
+
+# A shorter title for the navigation bar.  Default is the same as html_title.
+#html_short_title = None
+
+# The name of an image file (relative to this directory) to place at the top
+# of the sidebar.
+#html_logo = None
+
+# The name of an image file (within the static path) to use as favicon of the
+# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
+# pixels large.
+#html_favicon = None
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = ['_static']
+
+# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
+# using the given strftime format.
+#html_last_updated_fmt = '%b %d, %Y'
+
+# If true, SmartyPants will be used to convert quotes and dashes to
+# typographically correct entities.
+#html_use_smartypants = True
+
+# Custom sidebar templates, maps document names to template names.
+#html_sidebars = {}
+
+# Additional templates that should be rendered to pages, maps page names to
+# template names.
+#html_additional_pages = {}
+
+# If false, no module index is generated.
+#html_domain_indices = True
+
+# If false, no index is generated.
+#html_use_index = True
+
+# If true, the index is split into individual pages for each letter.
+#html_split_index = False
+
+# If true, links to the reST sources are added to the pages.
+#html_show_sourcelink = True
+
+# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
+#html_show_sphinx = True
+
+# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
+#html_show_copyright = True
+
+# If true, an OpenSearch description file will be output, and all pages will
+# contain a <link> tag referring to it.  The value of this option must be the
+# base URL from which the finished HTML is served.
+#html_use_opensearch = ''
+
+# This is the file name suffix for HTML files (e.g. ".xhtml").
+#html_file_suffix = None
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = 'GRASS70Documentationdoc'
+
+
+# -- Options for LaTeX output --------------------------------------------------
+
+latex_elements = {
+# The paper size ('letterpaper' or 'a4paper').
+#'papersize': 'letterpaper',
+
+# The font size ('10pt', '11pt' or '12pt').
+#'pointsize': '10pt',
+
+# Additional stuff for the LaTeX preamble.
+#'preamble': '',
+}
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title, author, documentclass [howto/manual]).
+latex_documents = [
+  ('content', 'GRASS70Documentation.tex', u'GRASS 7.0 Documentation Documentation',
+   u'GRASS Development Team', 'manual'),
+]
+
+# The name of an image file (relative to this directory) to place at the top of
+# the title page.
+#latex_logo = None
+
+# For "manual" documents, if this is true, then toplevel headings are parts,
+# not chapters.
+#latex_use_parts = False
+
+# If true, show page references after internal links.
+#latex_show_pagerefs = False
+
+# If true, show URL addresses after external links.
+#latex_show_urls = False
+
+# Documents to append as an appendix to all manuals.
+#latex_appendices = []
+
+# If false, no module index is generated.
+#latex_domain_indices = True
+
+
+# -- Options for manual page output --------------------------------------------
+
+# One entry per manual page. List of tuples
+# (source start file, name, description, authors, manual section).
+man_pages = [
+    ('content', 'grass70documentation', u'GRASS 7.0 Documentation Documentation',
+     [u'GRASS Development Team'], 1)
+]
+
+# If true, show URL addresses after external links.
+#man_show_urls = False
+
+
+# -- Options for Texinfo output ------------------------------------------------
+
+# Grouping the document tree into Texinfo files. List of tuples
+# (source start file, target name, title, author,
+#  dir menu entry, description, category)
+texinfo_documents = [
+  ('content', 'GRASS70Documentation', u'GRASS 7.0 Documentation Documentation',
+   u'GRASS Development Team', 'GRASS70Documentation', 'One line description of project.',
+   'Miscellaneous'),
+]
+
+# Documents to append as an appendix to all manuals.
+#texinfo_appendices = []
+
+# If false, no module index is generated.
+#texinfo_domain_indices = True
+
+# How to display URL addresses: 'footnote', 'no', or 'inline'.
+#texinfo_show_urls = 'footnote'
+
+
+# -- Options for Epub output ---------------------------------------------------
+
+# Bibliographic Dublin Core info.
+epub_title = u'GRASS 7.0 Documentation'
+epub_author = u'GRASS Development Team'
+epub_publisher = u'GRASS Development Team'
+epub_copyright = u'2012, GRASS Development Team'
+
+# The language of the text. It defaults to the language option
+# or en if the language is not set.
+#epub_language = ''
+
+# The scheme of the identifier. Typical schemes are ISBN or URL.
+#epub_scheme = ''
+
+# The unique identifier of the text. This can be a ISBN number
+# or the project homepage.
+#epub_identifier = ''
+
+# A unique identification for the text.
+#epub_uid = ''
+
+# A tuple containing the cover image and cover page html template filenames.
+#epub_cover = ()
+
+# HTML files that should be inserted before the pages created by sphinx.
+# The format is a list of tuples containing the path and title.
+#epub_pre_files = []
+
+# HTML files shat should be inserted after the pages created by sphinx.
+# The format is a list of tuples containing the path and title.
+#epub_post_files = []
+
+# A list of files that should not be packed into the epub file.
+#epub_exclude_files = []
+
+# The depth of the table of contents in toc.ncx.
+#epub_tocdepth = 3
+
+# Allow duplicate toc entries.
+#epub_tocdup = True

Added: grass/trunk/man/sphinx/make.bat
===================================================================
--- grass/trunk/man/sphinx/make.bat	                        (rev 0)
+++ grass/trunk/man/sphinx/make.bat	2012-08-13 13:09:45 UTC (rev 52656)
@@ -0,0 +1,190 @@
+ at ECHO OFF
+
+REM Command file for Sphinx documentation
+
+if "%SPHINXBUILD%" == "" (
+	set SPHINXBUILD=sphinx-build
+)
+set BUILDDIR=_build
+set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .
+set I18NSPHINXOPTS=%SPHINXOPTS% .
+if NOT "%PAPER%" == "" (
+	set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
+	set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
+)
+
+if "%1" == "" goto help
+
+if "%1" == "help" (
+	:help
+	echo.Please use `make ^<target^>` where ^<target^> is one of
+	echo.  html       to make standalone HTML files
+	echo.  dirhtml    to make HTML files named index.html in directories
+	echo.  singlehtml to make a single large HTML file
+	echo.  pickle     to make pickle files
+	echo.  json       to make JSON files
+	echo.  htmlhelp   to make HTML files and a HTML help project
+	echo.  qthelp     to make HTML files and a qthelp project
+	echo.  devhelp    to make HTML files and a Devhelp project
+	echo.  epub       to make an epub
+	echo.  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter
+	echo.  text       to make text files
+	echo.  man        to make manual pages
+	echo.  texinfo    to make Texinfo files
+	echo.  gettext    to make PO message catalogs
+	echo.  changes    to make an overview over all changed/added/deprecated items
+	echo.  linkcheck  to check all external links for integrity
+	echo.  doctest    to run all doctests embedded in the documentation if enabled
+	goto end
+)
+
+if "%1" == "clean" (
+	for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
+	del /q /s %BUILDDIR%\*
+	goto end
+)
+
+if "%1" == "html" (
+	%SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished. The HTML pages are in %BUILDDIR%/html.
+	goto end
+)
+
+if "%1" == "dirhtml" (
+	%SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
+	goto end
+)
+
+if "%1" == "singlehtml" (
+	%SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
+	goto end
+)
+
+if "%1" == "pickle" (
+	%SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished; now you can process the pickle files.
+	goto end
+)
+
+if "%1" == "json" (
+	%SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished; now you can process the JSON files.
+	goto end
+)
+
+if "%1" == "htmlhelp" (
+	%SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished; now you can run HTML Help Workshop with the ^
+.hhp project file in %BUILDDIR%/htmlhelp.
+	goto end
+)
+
+if "%1" == "qthelp" (
+	%SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished; now you can run "qcollectiongenerator" with the ^
+.qhcp project file in %BUILDDIR%/qthelp, like this:
+	echo.^> qcollectiongenerator %BUILDDIR%\qthelp\GRASS70Documentation.qhcp
+	echo.To view the help file:
+	echo.^> assistant -collectionFile %BUILDDIR%\qthelp\GRASS70Documentation.ghc
+	goto end
+)
+
+if "%1" == "devhelp" (
+	%SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished.
+	goto end
+)
+
+if "%1" == "epub" (
+	%SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished. The epub file is in %BUILDDIR%/epub.
+	goto end
+)
+
+if "%1" == "latex" (
+	%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
+	goto end
+)
+
+if "%1" == "text" (
+	%SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished. The text files are in %BUILDDIR%/text.
+	goto end
+)
+
+if "%1" == "man" (
+	%SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished. The manual pages are in %BUILDDIR%/man.
+	goto end
+)
+
+if "%1" == "texinfo" (
+	%SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
+	goto end
+)
+
+if "%1" == "gettext" (
+	%SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
+	goto end
+)
+
+if "%1" == "changes" (
+	%SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.The overview file is in %BUILDDIR%/changes.
+	goto end
+)
+
+if "%1" == "linkcheck" (
+	%SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Link check complete; look for any errors in the above output ^
+or in %BUILDDIR%/linkcheck/output.txt.
+	goto end
+)
+
+if "%1" == "doctest" (
+	%SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Testing of doctests in the sources finished, look at the ^
+results in %BUILDDIR%/doctest/output.txt.
+	goto end
+)
+
+:end

Modified: grass/trunk/misc/Makefile
===================================================================
--- grass/trunk/misc/Makefile	2012-08-13 11:54:28 UTC (rev 52655)
+++ grass/trunk/misc/Makefile	2012-08-13 13:09:45 UTC (rev 52656)
@@ -11,3 +11,6 @@
 
 default: parsubdirs
 
+restdocs: restdir
+	 
+restdir: parsubdirs

Modified: grass/trunk/ps/Makefile
===================================================================
--- grass/trunk/ps/Makefile	2012-08-13 11:54:28 UTC (rev 52655)
+++ grass/trunk/ps/Makefile	2012-08-13 13:09:45 UTC (rev 52656)
@@ -8,4 +8,6 @@
 
 default: parsubdirs
 
+restdocs: restdir
 
+restdir: parsubdirs

Modified: grass/trunk/raster/Makefile
===================================================================
--- grass/trunk/raster/Makefile	2012-08-13 11:54:28 UTC (rev 52655)
+++ grass/trunk/raster/Makefile	2012-08-13 13:09:45 UTC (rev 52656)
@@ -146,3 +146,13 @@
 
 $(HTMLDIR)/r.out.png:
 	# no-op - override Html.make rule for .png image files
+
+restdocs: restdir
+	 
+restdir: parsubdirs
+         $(RESTDIR)/r.in.png:
+	     # no-op - override Html.make rule for .png image files
+
+         $(RESTDIR)/r.out.png:
+	     # no-op - override Html.make rule for .png image files
+

Modified: grass/trunk/raster/r.watershed/ram/Makefile
===================================================================
--- grass/trunk/raster/r.watershed/ram/Makefile	2012-08-13 11:54:28 UTC (rev 52655)
+++ grass/trunk/raster/r.watershed/ram/Makefile	2012-08-13 13:09:45 UTC (rev 52656)
@@ -8,6 +8,7 @@
 
 include $(MODULE_TOPDIR)/include/Make/Etc.make
 include $(MODULE_TOPDIR)/include/Make/NoHtml.make
+include $(MODULE_TOPDIR)/include/Make/NoRest.make
 
 default: $(DIR) etc
 

Modified: grass/trunk/raster/r.watershed/seg/Makefile
===================================================================
--- grass/trunk/raster/r.watershed/seg/Makefile	2012-08-13 11:54:28 UTC (rev 52655)
+++ grass/trunk/raster/r.watershed/seg/Makefile	2012-08-13 13:09:45 UTC (rev 52656)
@@ -8,6 +8,7 @@
 
 include $(MODULE_TOPDIR)/include/Make/Etc.make
 include $(MODULE_TOPDIR)/include/Make/NoHtml.make
+include $(MODULE_TOPDIR)/include/Make/NoRest.make
 
 default: $(DIR) etc
 

Modified: grass/trunk/raster3d/Makefile
===================================================================
--- grass/trunk/raster3d/Makefile	2012-08-13 11:54:28 UTC (rev 52655)
+++ grass/trunk/raster3d/Makefile	2012-08-13 13:09:45 UTC (rev 52656)
@@ -27,3 +27,6 @@
 
 htmldir: parsubdirs
 
+restdocs: restdir
+
+restdir: parsubdirs

Modified: grass/trunk/scripts/Makefile
===================================================================
--- grass/trunk/scripts/Makefile	2012-08-13 11:54:28 UTC (rev 52655)
+++ grass/trunk/scripts/Makefile	2012-08-13 13:09:45 UTC (rev 52656)
@@ -78,3 +78,6 @@
 
 default: parsubdirs
 
+restdocs: restdir
+	 
+restdir: parsubdirs

Modified: grass/trunk/temporal/Makefile
===================================================================
--- grass/trunk/temporal/Makefile	2012-08-13 11:54:28 UTC (rev 52655)
+++ grass/trunk/temporal/Makefile	2012-08-13 13:09:45 UTC (rev 52656)
@@ -41,3 +41,6 @@
 
 htmldir: parsubdirs
 
+restdocs: restdir
+
+restdir: parsubdirs

Modified: grass/trunk/tools/Makefile
===================================================================
--- grass/trunk/tools/Makefile	2012-08-13 11:54:28 UTC (rev 52655)
+++ grass/trunk/tools/Makefile	2012-08-13 13:09:45 UTC (rev 52656)
@@ -5,10 +5,13 @@
 include $(MODULE_TOPDIR)/include/Make/Dir.make
 include $(MODULE_TOPDIR)/include/Make/Compile.make
 
-default: parsubdirs $(TOOLSDIR)/mkhtml.py $(TOOLSDIR)/g.echo$(EXE)
+default: parsubdirs $(TOOLSDIR)/mkhtml.py $(TOOLSDIR)/mkrest.py $(TOOLSDIR)/g.echo$(EXE)
 
 $(TOOLSDIR)/mkhtml.py: mkhtml.py
 	$(INSTALL) $< $@
 
+$(TOOLSDIR)/mkrest.py: mkrest.py
+	$(INSTALL) $< $@
+
 $(TOOLSDIR)/g.echo$(EXE): $(OBJDIR)/g.echo.o
 	$(call linker_base,$(LINK),$(LDFLAGS) $(EXTRA_LDFLAGS),$(MANIFEST_OBJ))

Added: grass/trunk/tools/mkrest.py
===================================================================
--- grass/trunk/tools/mkrest.py	                        (rev 0)
+++ grass/trunk/tools/mkrest.py	2012-08-13 13:09:45 UTC (rev 52656)
@@ -0,0 +1,125 @@
+
+#!/usr/bin/env python
+
+############################################################################
+#
+# MODULE:       mkrest.py
+# AUTHOR(S):    Luca Delucchi
+# PURPOSE:      Create HTML manual page snippets
+# COPYRIGHT:    (C) 2012 by Luca Delucchi
+#                and the GRASS Development Team
+#
+#               This program is free software under the GNU General
+#               Public License (>=v2). Read the file COPYING that
+#               comes with GRASS for details.
+#
+#############################################################################
+
+import sys
+import string
+import re
+import subprocess
+from datetime import datetime
+
+pgm = sys.argv[1]
+if len(sys.argv) > 1:
+    year = sys.argv[2]
+else:
+    year = str(datetime.now().year)
+
+src_file = "%s.html" % pgm
+tmp_file = "%s.tmp.txt" % pgm
+
+#TODO add copyright
+
+footer_index = string.Template(\
+"""
+
+:doc:`Main Page <index>` - :doc:`${INDEXNAMECAP} index <${INDEXNAME}>` - :doc:`Full index <full_index>` 
+2003-${YEAR} `GRASS Development Team <http://grass.osgeo.org>`_
+""")
+
+footer_noindex = string.Template(\
+"""
+
+:doc:`Main Page <index>`  - :doc:`Full index <full_index>` 
+2003-${YEAR} `GRASS Development Team <http://grass.osgeo.org>`_
+""")
+
+
+def read_file(name):
+    try:
+        f = open(name, 'rb')
+        s = f.read()
+        f.close()
+        return s
+    except IOError:
+        return ""
+
+replacement = {
+    '*`' : '`',
+    '`* `' : '`',
+    '>`_*' : '>`_',
+    '>`_,*' : '>`_,'
+}
+
+src_data = read_file(src_file)
+
+title = re.search('(<!-- meta page description:)(.*)(-->)', src_data, re.IGNORECASE)
+
+if title:
+    title_name = title.group(2).strip()
+    sys.stdout.write("%s\n" % title_name)
+    title_style = "=" * (len(title_name)+2)
+    sys.stdout.write("%s\n\n" % title_style)
+
+tmp_data = read_file(tmp_file)
+if tmp_data:
+    sys.stdout.write(tmp_data)
+
+process = subprocess.Popen('pandoc -s -r html %s -w rst' % src_file, 
+                           shell=True, stdout=subprocess.PIPE)
+html_text = process.communicate()[0]
+if html_text:
+    for k, v in replacement.iteritems():
+        html_text = html_text.replace(k, v)
+
+#TODO remove with space if string start with it, " vector..." -> "vector..."
+#     not if it is a tab: "     vector...." -> "    vector..."
+
+#    for line in html_text.splitlines(True):
+#        sys.stdout.write("%s" % line.lstrip())
+
+sys.stdout.write(html_text)
+
+index_names = {
+    'd': 'display',
+    'db': 'database',
+    'g': 'general',
+    'i': 'imagery',
+    'm': 'misc',
+    'ps': 'postscript',
+    'p': 'paint',
+    'r': 'raster',
+    'r3': 'raster3D',
+    's': 'sites',
+    't': 'temporal',
+    'v': 'vector'
+    }
+
+index = re.search('(<!-- meta page index:)(.*)(-->)', src_data, re.IGNORECASE)
+
+if index:
+    index_name = index.group(2).strip()
+else:
+    mod_class = pgm.split('.', 1)[0]
+    index_name = index_names.get(mod_class, '')
+
+if index_name:
+    sys.stdout.write(footer_index.substitute(INDEXNAME = index_name,
+                                             INDEXNAMECAP = index_name.title(),
+                                             YEAR = year))
+else:
+    sys.stdout.write(footer_noindex.substitute(YEAR = year))
+    
+sys.exit()

Modified: grass/trunk/tools/timer/Makefile
===================================================================
--- grass/trunk/tools/timer/Makefile	2012-08-13 11:54:28 UTC (rev 52655)
+++ grass/trunk/tools/timer/Makefile	2012-08-13 13:09:45 UTC (rev 52656)
@@ -5,6 +5,7 @@
 
 include $(MODULE_TOPDIR)/include/Make/Etc.make
 include $(MODULE_TOPDIR)/include/Make/NoHtml.make
+include $(MODULE_TOPDIR)/include/Make/NoRest.make
 
 FMODE_OBJ =
 

Modified: grass/trunk/vector/Makefile
===================================================================
--- grass/trunk/vector/Makefile	2012-08-13 11:54:28 UTC (rev 52655)
+++ grass/trunk/vector/Makefile	2012-08-13 13:09:45 UTC (rev 52656)
@@ -106,3 +106,7 @@
 
 htmldir: parsubdirs
 
+restdocs: restdir
+
+restdir: parsubdirs
+

Modified: grass/trunk/vector/v.in.ogr/v.in.ogr.html
===================================================================
--- grass/trunk/vector/v.in.ogr/v.in.ogr.html	2012-08-13 11:54:28 UTC (rev 52655)
+++ grass/trunk/vector/v.in.ogr/v.in.ogr.html	2012-08-13 13:09:45 UTC (rev 52656)
@@ -24,7 +24,7 @@
 <h3>Supported OGR Vector Formats</h3>
 
 <a href="http://www.gdal.org/ogr/drv_shapefile.html">ESRI
-Shapefile</a><br>
+Shapefile</a><br />
 <a href="http://www.gdal.org/ogr/drv_mitab.html">Mapinfo File</a>
 
 <p>Further available drivers such as UK .NTF, SDTS, TIGER, IHO S-57 (ENC),
@@ -81,53 +81,53 @@
 <div class="code"><pre>
 v.in.ogr dsn=/home/user/shape_data layer=test_shape output=grass_map 
 </pre></div>
-<br>
+<br />
 
 <li><b>MapInfo files</b>
 <div class="code"><pre>
 v.in.ogr dsn=./ layer=mapinfo_test output=grass_map
 </pre></div>
-<br>
+<br />
 
-<li><b>Arc Coverage</b><br>
+<li><b>Arc Coverage</b><br />
  We import the Arcs and Label points, the module takes care to
- build areas:<br>
+ build areas:<br />
 <div class="code"><pre>
 v.in.ogr dsn=gemeinden layer=LAB,ARC type=centroid,boundary output=mymap
 </pre></div>
-<br>
+<br />
 
-<li><b>E00 file</b> (see also <em><a href="v.in.e00.html">v.in.e00</a></em>)<br>
+<li><b>E00 file</b> (see also <em><a href="v.in.e00.html">v.in.e00</a></em>)<br />
  First we have to convert the E00 file to an Arc Coverage with 'avcimport' 
  (<a href="http://avce00.maptools.org/avce00/index.html">AVCE00 tools</a>,
- use <em>e00conv</em> first in case that <em>avcimport</em> fails):<br>
+ use <em>e00conv</em> first in case that <em>avcimport</em> fails):<br />
 <div class="code"><pre>
 avcimport e00file coverage
 v.in.ogr dsn=coverage layer=LAB,ARC type=centroid,boundary output=mymap
 </pre></div>
-<br>
+<br />
 
-<li><b>SDTS files</b> (you have to select the CATD file)<br>
+<li><b>SDTS files</b> (you have to select the CATD file)<br />
 <div class="code"><pre>
 v.in.ogr dsn=CITXCATD.DDF output=cities
 </pre></div>
-<br>
+<br />
 
-<li><b>TIGER files</b><br>
+<li><b>TIGER files</b><br />
 <div class="code"><pre>
 v.in.ogr dsn=input/2000/56015/ layer=CompleteChain,PIP output=t56015_all \
 type=boundary,centroid snap=-1
 </pre></div>
-<br>
+<br />
 
-<li><b>PostGIS maps</b> (area example)<br>
+<li><b>PostGIS maps</b> (area example)<br />
 <div class="code"><pre>
 v.in.ogr dsn="PG:host=localhost dbname=postgis user=postgres" layer=polymap \
 output=polygons type=boundary,centroid
 </pre></div>
-<br>
+<br />
 
-<li><b>Oracle Spatial maps </b><br>
+<li><b>Oracle Spatial maps </b><br />
 Note that you have to set the environment-variables <tt>ORACLE_BASE,
 ORACLE_SID, ORACLE_HOME</tt> and <tt>TNS_ADMIN</tt> accordingly.
 <div class="code"><pre>
@@ -159,14 +159,14 @@
 
 <h2>NOTES</h2>
 
-The characters used for table column names are limited. Supported are:<br>
+The characters used for table column names are limited. Supported are:<br />
 <div class="code"><pre>
 [A-Za-z][A-Za-z0-9_]*
 </pre></div>
 
 This means that SQL neither supports '.' (dots) nor '-' (minus) nor '#' in table
 column names. Also a table name must start with a character, not a number.
-<br>
+<br />
 <em>v.in.ogr</em> converts '.', '-' and '#' to '_' (underscore) during import.
 The <em>-w</em> flag changes capital column names to lowercase characters as
 a convenience for SQL usage (lowercase column names avoid the need to quote them
@@ -194,13 +194,13 @@
 <h2>ERROR MESSAGES</h2>
 
 <i>"ERROR: DBMI-DBF driver error:
-SQL parser error: syntax error, unexpected DESC, expecting NAME processing 'DESC'"</i><br>
+SQL parser error: syntax error, unexpected DESC, expecting NAME processing 'DESC'"</i><br />
 
 indicates that a column name corresponds to a reserved SQL word (here: 'DESC').
 A different column name should be used. The <em>cnames</em> parameter can be used
 to assign different column names on the fly.
 
-<p><i>"ERROR: Projection of dataset does not appear to match the current location."</i><br>
+<p><i>"ERROR: Projection of dataset does not appear to match the current location."</i><br />
 
 You need to create a location whose projection matches the data you
 wish to import. Try using <em>location</em> parameter to create a new location based
@@ -209,7 +209,7 @@
 
 <h2>REFERENCES</h2>
 
-<a href="http://www.gdal.org/ogr/">OGR vector library</a> <br>
+<a href="http://www.gdal.org/ogr/">OGR vector library</a> <br />
 <a href="http://www.gdal.org/ogr/ogr__api_8h.html">OGR vector library C API</a> documentation
 
 
@@ -224,7 +224,7 @@
 <a href="v.external.html">v.external</a>,
 <a href="v.in.db.html">v.in.db</a>,
 <a href="v.in.e00.html">v.in.e00</a>,
-<a href="v.out.ogr.html">v.out.ogr</a>,<br>
+<a href="v.out.ogr.html">v.out.ogr</a>,<br />
 <a href="grass-pg.html">PostGIS driver</a>
 </em>
 
@@ -232,7 +232,7 @@
 <h2>AUTHOR</h2>
 
 Radim Blazek, ITC-irst, Trento, Italy
-<br>
+<br />
 Location and spatial extent support by Markus Neteler and Paul Kelly
 
 <p><i>Last changed: $Date$</i>



More information about the grass-commit mailing list