[mapserver-commits] r8288 - in trunk/docs: . development include

svn at osgeo.org svn at osgeo.org
Fri Dec 26 15:54:59 EST 2008


Author: hobu
Date: 2008-12-26 15:54:59 -0500 (Fri, 26 Dec 2008)
New Revision: 8288

Added:
   trunk/docs/include/labels.inc
   trunk/docs/labels.py
Modified:
   trunk/docs/
   trunk/docs/Makefile
   trunk/docs/conf.py
   trunk/docs/development/doc_style_guide.txt
Log:
adapt Georg's labels generation for the development style guide


Property changes on: trunk/docs
___________________________________________________________________
Name: svn:ignore
   - build

   + build
*.pyc


Modified: trunk/docs/Makefile
===================================================================
--- trunk/docs/Makefile	2008-12-26 15:25:23 UTC (rev 8287)
+++ trunk/docs/Makefile	2008-12-26 20:54:59 UTC (rev 8288)
@@ -73,3 +73,11 @@
 	@echo
 	@echo "Link check complete; look for any errors in the above output " \
 	      "or in build/linkcheck/output.txt."
+
+labels:
+	mkdir -p build/labels build/doctrees
+	$(SPHINXBUILD) -b labels $(ALLSPHINXOPTS) build/labels
+	@echo
+	@echo "Link check complete; look for any errors in the above output " \
+	      "or in build/labels/output.txt."
+	cp build/labels/labels.txt include/labels.inc

Modified: trunk/docs/conf.py
===================================================================
--- trunk/docs/conf.py	2008-12-26 15:25:23 UTC (rev 8287)
+++ trunk/docs/conf.py	2008-12-26 20:54:59 UTC (rev 8288)
@@ -16,14 +16,14 @@
 # If your extensions are in another directory, add it here. If the directory
 # is relative to the documentation root, use os.path.abspath to make it
 # absolute, like shown here.
-#sys.path.append(os.path.abspath('.'))
+sys.path.append(os.path.abspath('.'))
 
 # General configuration
 # ---------------------
 
 # Add any Sphinx extension module names here, as strings. They can be extensions
 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-extensions = []
+extensions = ['labels']
 
 # Add any paths that contain templates here, relative to this directory.
 templates_path = ['_templates']

Modified: trunk/docs/development/doc_style_guide.txt
===================================================================
--- trunk/docs/development/doc_style_guide.txt	2008-12-26 15:25:23 UTC (rev 8287)
+++ trunk/docs/development/doc_style_guide.txt	2008-12-26 20:54:59 UTC (rev 8288)
@@ -13,15 +13,16 @@
     :backlinks: top
     
 
-MapServer instead of mapserver, map server, Map Server or map Server.
+* MapServer instead of mapserver, map server, Map Server or map Server.
+* MapScript instead of mapscript, Mapscript, or map script.
+* PostGIS instead of postgis.
+* HowTo instead of howto or HOWTO.
+* Email addresses should be manually spam protected: 
+  
+  ::
 
-MapScript instead of mapscript, Mapscript, or map script.
+      hobu.inc at gmail.com instead of hobu.inc at gmail.com
 
-PostGIS instead of postgis.
-
-HowTo instead of howto or HOWTO.
-
-
 ReStructured Text Formatting
 ----------------------------
 
@@ -30,6 +31,8 @@
 
 no ``.. sectnum::`` in the contents directives
 
+Reference Labels
+----------------
 
-Email addresses should be manually spam protected:
-hobu.inc at gmail.com instead of hobu.inc at gmail.com
\ No newline at end of file
+.. include:: ../include/labels.inc
+

Added: trunk/docs/include/labels.inc
===================================================================
--- trunk/docs/include/labels.inc	                        (rev 0)
+++ trunk/docs/include/labels.inc	2008-12-26 20:54:59 UTC (rev 8288)
@@ -0,0 +1,189 @@
+.. table:: \:ref\: reference labels
+
+	============================   =============================================================================================
+	Label                          Title
+	============================   =============================================================================================
+	agg                            :ref:`AGG Rendering Specifics <agg>`
+	antialias                      :ref:`AntiAliasing with MapServer <antialias>`
+	arcinfo                        :ref:`ArcInfo <arcinfo>`
+	arcsde                         :ref:`ArcSDE <arcsde>`
+	autotest                       :ref:`Regression Testing <autotest>`
+	bugs                           :ref:`Bug Submission <bugs>`
+	cgi                            :ref:`CGI <cgi>`
+	cgi_controls                   :ref:`MapServer CGI Controls <cgi_controls>`
+	cgi_introduction               :ref:`MapServer CGI Introduction <cgi_introduction>`
+	class                          :ref:`CLASS <class>`
+	community                      :ref:`Community Activities <community>`
+	development                    :ref:`Development <development>`
+	dgn                            :ref:`DGN <dgn>`
+	documentation                  :ref:`MapServer 5.2.1 Documentation <documentation>`
+	dotnet_compile                 :ref:`.NET MapScript Compilation <dotnet_compile>`
+	download                       :ref:`Download <download>`
+	dynamic_charting               :ref:`Dynamic Charting <dynamic_charting>`
+	editing                        :ref:`Mapfile Editing <editing>`
+	errors                         :ref:`Errors <errors>`
+	expressions                    :ref:`Expressions <expressions>`
+	fastcgi                        :ref:`FastCGI <fastcgi>`
+	feature                        :ref:`FEATURE <feature>`
+	filter_encoding                :ref:`WFS Filter Encoding <filter_encoding>`
+	flash                          :ref:`Flash Output <flash>`
+	fontset                        :ref:`FONTSET <fontset>`
+	format_types                   :ref:`Data Format Types <format_types>`
+	genindex                       :ref:`genindex`
+	gloss                          :ref:`Glossary <gloss>`
+	gml                            :ref:`GML <gml>`
+	grid                           :ref:`GRID <grid>`
+	home                           :ref:`Welcome to MapServer <home>`
+	html_legend                    :ref:`HTML Legends with MapServer <html_legend>`
+	iis                            :ref:`IIS Setup for MapServer <iis>`
+	imagemaps                      :ref:`HTML Imagemaps <imagemaps>`
+	include                        :ref:`INCLUDE <include>`
+	inline                         :ref:`Inline <inline>`
+	input                          :ref:`Data Input <input>`
+	input_postgis                  :ref:`PostGIS/PostgreSQL <input_postgis>`
+	installation                   :ref:`Installation <installation>`
+	introduction                   :ref:`An Introduction to MapServer <introduction>`
+	irc                            :ref:`IRC <irc>`
+	join                           :ref:`JOIN <join>`
+	kml                            :ref:`KML - Keyhole Markup Language <kml>`
+	label                          :ref:`LABEL <label>`
+	layer                          :ref:`LAYER <layer>`
+	legend                         :ref:`LEGEND <legend>`
+	legend_utility                 :ref:`legend <legend_utility>`
+	license                        :ref:`License <license>`
+	linux                          :ref:`Linux <linux>`
+	lists                          :ref:`Mailing Lists <lists>`
+	management                     :ref:`Management <management>`
+	map                            :ref:`MAP <map>`
+	map_context                    :ref:`Map Context <map_context>`
+	mapcontext_cgi                 :ref:`Map Context Files <mapcontext_cgi>`
+	mapfile                        :ref:`Mapfile <mapfile>`
+	mapfile_tuning                 :ref:`Mapfile <mapfile_tuning>`
+	mapinfo                        :ref:`MapInfo <mapinfo>`
+	mapscript                      :ref:`MapScript <mapscript>`
+	mapscript_introduction         :ref:`Introduction <mapscript_introduction>`
+	mapscript_ows                  :ref:`MapScript Wrappers for WxS Services <mapscript_ows>`
+	mapscript_tests                :ref:`MapScript Unit Testing <mapscript_tests>`
+	mapserv                        :ref:`mapserv <mapserv>`
+	modindex                       :ref:`modindex`
+	msencrypt                      :ref:`msencrypt <msencrypt>`
+	mysql                          :ref:`MySQL <mysql>`
+	ntf                            :ref:`NTF <ntf>`
+	oci                            :ref:`Oracle Spatial <oci>`
+	oci_install                    :ref:`Oracle Installation <oci_install>`
+	ogc                            :ref:`OGC Operation and Configuration <ogc>`
+	ogr                            :ref:`OGR <ogr>`
+	online_resource_wms            :ref:`More About the Online Resource URL <online_resource_wms>`
+	optimization                   :ref:`Optimization <optimization>`
+	osx                            :ref:`Mac OS X <osx>`
+	output                         :ref:`Output Generation <output>`
+	outputformat                   :ref:`OUTPUTFORMAT <outputformat>`
+	pdf                            :ref:`PDF Output <pdf>`
+	pgeo                           :ref:`ESRI Personal Geodatabase (MDB) <pgeo>`
+	php                            :ref:`PHP MapScript <php>`
+	php_example                    :ref:`By Example <php_example>`
+	php_install                    :ref:`PHP MapScript Installation <php_install>`
+	projection                     :ref:`PROJECTION <projection>`
+	python                         :ref:`Python MapScript Appendix <python>`
+	querying                       :ref:`Querying <querying>`
+	querymap                       :ref:`QUERYMAP <querymap>`
+	raster                         :ref:`Raster Data <raster>`
+	raster_optimization            :ref:`Raster <raster_optimization>`
+	reference                      :ref:`REFERENCE <reference>`
+	rfc1                           :ref:`MS RFC 1: Technical Steering Committee Guidelines <rfc1>`
+	rfc10                          :ref:`MS RFC 10: Joining the Open Source Geospatial Foundation <rfc10>`
+	rfc11                          :ref:`MS RFC 11: Support for Curved Labels <rfc11>`
+	rfc12                          :ref:`MS RFC 12: C code Unit tests <rfc12>`
+	rfc13                          :ref:`MS RFC 13: Support of Sensor Observation Service in MapServer <rfc13>`
+	rfc14                          :ref:`MS RFC 14: Relative Coordinates for INLINE features <rfc14>`
+	rfc15                          :ref:`MS RFC 15: Support for thread neutral operation of MapServer/MapScript <rfc15>`
+	rfc16                          :ref:`MS RFC 16: MapScript WxS Services <rfc16>`
+	rfc17                          :ref:`MS RFC 17: Dynamic Allocation of layers, styles, classes and symbols <rfc17>`
+	rfc18                          :ref:`MS RFC 18: Encryption of passwords in mapfiles <rfc18>`
+	rfc19                          :ref:`MS RFC 19: Style & Label attribute binding <rfc19>`
+	rfc2                           :ref:`MS RFC 2: Creating line features and/or shapes using WKT <rfc2>`
+	rfc21                          :ref:`MS RFC 21: MapServer Raster Color Correction <rfc21>`
+	rfc22a                         :ref:`MS RFC 22a: Feature cache for long running processes and query processing <rfc22a>`
+	rfc23                          :ref:`MS RFC 23: Technical Steering Committee Guidelines <rfc23>`
+	rfc24                          :ref:`MS RFC 24: Mapscript memory management <rfc24>`
+	rfc24first                     :ref:`MS RFC 24: Mapscript memory management <rfc24first>`
+	rfc25                          :ref:`MS RFC 25: Align MapServer pixel and extent models with OGC models <rfc25>`
+	rfc26                          :ref:`MS RFC 26: Version 5 Terminology Cleanup <rfc26>`
+	rfc27                          :ref:`MS RFC 27: Label Priority <rfc27>`
+	rfc28                          :ref:`MS RFC 28: Redesign of LOG/DEBUG output mechanisms <rfc28>`
+	rfc29                          :ref:`MS RFC 29: Dynamic Charting Capability <rfc29>`
+	rfc3                           :ref:`MS RFC 3: Feature Layer Plug-in Architecture <rfc3>`
+	rfc30                          :ref:`MS RFC 30: Support for WMS 1.3.0 <rfc30>`
+	rfc31                          :ref:`MS RFC 31: Loading MapServer Objects from Strings <rfc31>`
+	rfc32                          :ref:`MS RFC 32: Support for Anti-Grain Geometry (AGG) Rendering Engine <rfc32>`
+	rfc33                          :ref:`MS RFC 33: Removing msLayerWhichItems() from maplayer.c <rfc33>`
+	rfc39                          :ref:`MS RFC 39: Support of WMS/SLD Named Styles <rfc39>`
+	rfc4                           :ref:`MS RFC 4: MapServer Raster Resampling <rfc4>`
+	rfc40                          :ref:`MS RFC 40: Support Label Text Transformations <rfc40>`
+	rfc41                          :ref:`MS RFC 41: Support of WCS 1.1.x Protocol <rfc41>`
+	rfc42                          :ref:`MS RFC 42: Support of Cookies Forwarding <rfc42>`
+	rfc43                          :ref:`MS RFC 43: Direct tile generation for Google Maps and Virtual Earth API <rfc43>`
+	rfc44                          :ref:`MS RFC 44: Restore URL modification of mapfiles to pre-5.0 levels <rfc44>`
+	rfc45                          :ref:`MS RFC 45: Symbology, Labeling, and Cartography Improvements <rfc45>`
+	rfc46                          :ref:`MS RFC 46: Migrate Website to OSGeo <rfc46>`
+	rfc47                          :ref:`MS RFC 47: Move IGNORE_MISSING_DATA to run-time configuration <rfc47>`
+	rfc48                          :ref:`MS RFC 48: GEOTRANSFORM Geometry operations <rfc48>`
+	rfc49                          :ref:`MS RFC 49: Symbology, Labeling, and Cartography Improvements <rfc49>`
+	rfc5                           :ref:`MS RFC 5: MapServer Horizon Reprojection Improvements <rfc5>`
+	rfc50                          :ref:`MS RFC 50: OpenGL Rendering Support <rfc50>`
+	rfc6                           :ref:`MS RFC 6: Color Range Mapping of Continuous Feature Values <rfc6>`
+	rfc7                           :ref:`MS RFC 7: MapServer CVS Commit Management <rfc7>`
+	rfc7.1                         :ref:`MS RFC 7.1: MapServer SVN Commit Management <rfc7.1>`
+	rfc8                           :ref:`MS RFC 8: Pluggable External Feature Layer Providers <rfc8>`
+	rfc9                           :ref:`MS RFC 9: Item tag for query templates <rfc9>`
+	rfcs                           :ref:`Request for Comments <rfcs>`
+	runsub                         :ref:`Run-time Substitution <runsub>`
+	s57                            :ref:`S57 <s57>`
+	scalebar                       :ref:`SCALEBAR <scalebar>`
+	scalebar_utility               :ref:`scalebar <scalebar_utility>`
+	sdts                           :ref:`SDTS <sdts>`
+	search                         :ref:`search`
+	shapefiles                     :ref:`ESRI Shapefiles (SHP) <shapefiles>`
+	shp2img                        :ref:`shp2img <shp2img>`
+	shptree                        :ref:`shptree <shptree>`
+	shptreevis                     :ref:`shptreevis <shptreevis>`
+	sld                            :ref:`SLD <sld>`
+	sortshp                        :ref:`sortshp <sortshp>`
+	sos_server                     :ref:`SOS Server <sos_server>`
+	source                         :ref:`Source <source>`
+	sponsors                       :ref:`Sponsors <sponsors>`
+	style                          :ref:`STYLE <style>`
+	svg                            :ref:`SVG <svg>`
+	svn                            :ref:`Subversion <svn>`
+	swig                           :ref:`SWIG MapScript API Reference <swig>`
+	sym2img                        :ref:`legend <sym2img>`
+	sym_construction               :ref:`Cartographic Symbol Construction with MapServer <sym_construction>`
+	sym_examples                   :ref:`Symbology Examples <sym_examples>`
+	symbol                         :ref:`SYMBOL <symbol>`
+	template                       :ref:`Templating <template>`
+	testing                        :ref:`Testing <testing>`
+	tiger                          :ref:`USGS TIGER <tiger>`
+	tile4ms                        :ref:`tile4ms <tile4ms>`
+	tile_mode                      :ref:`Tile Mode <tile_mode>`
+	tileindex                      :ref:`Tile Indexes <tileindex>`
+	unix                           :ref:`Compiling on Unix <unix>`
+	utilities                      :ref:`Utilities <utilities>`
+	variable_sub                   :ref:`Variable Substitution <variable_sub>`
+	vector                         :ref:`Vector Data <vector>`
+	vector_optimization            :ref:`Vector <vector_optimization>`
+	vim                            :ref:`VIM Syntax <vim>`
+	virtual_vector                 :ref:`Virtual Spatial Data <virtual_vector>`
+	wcs_format                     :ref:`WCS Use Cases <wcs_format>`
+	wcs_server                     :ref:`WCS Server <wcs_server>`
+	web                            :ref:`WEB <web>`
+	wfs                            :ref:`WFS <wfs>`
+	wfs_client                     :ref:`WFS Client <wfs_client>`
+	wfs_server                     :ref:`WFS Server <wfs_server>`
+	win32                          :ref:`Compiling on Win32 <win32>`
+	windows                        :ref:`Windows <windows>`
+	wms_capabilities               :ref:`Validate the Capabilities Metadata <wms_capabilities>`
+	wms_client                     :ref:`WMS Client <wms_client>`
+	wms_server                     :ref:`WMS Server <wms_server>`
+	wms_time                       :ref:`WMS Time <wms_time>`
+	wrapper                        :ref:`A Simple CGI Wrapper Script <wrapper>`
+	============================   =============================================================================================

Added: trunk/docs/labels.py
===================================================================
--- trunk/docs/labels.py	                        (rev 0)
+++ trunk/docs/labels.py	2008-12-26 20:54:59 UTC (rev 8288)
@@ -0,0 +1,45 @@
+
+from os import path
+from itertools import groupby
+from sphinx.builder import Builder
+
+class CollectLabelsBuilder(Builder):
+   """
+   Collects all present explicit labels into a table.
+   """
+   name = 'labels'
+
+   def init(self):
+       pass
+
+   def get_outdated_docs(self):
+       return "table with all labels"
+
+   def write(self, *ignored):
+       labels = self.env.labels.items()
+       labels.sort(key=lambda x: x[0])
+
+       outfile = open(path.join(self.outdir, 'labels.txt'), 'w')
+       outfile.write('.. table:: \:ref\: reference labels\n\n')
+       outfile.write('\t============================   =============================================================================================\n')
+       outfile.write('\t%s %s\n' % ('Label'.ljust(30), 'Title'))
+       outfile.write('\t============================   =============================================================================================\n')
+       
+       unlabeled = ['genindex','search','modindex']
+       for docname, items in groupby(labels, key=lambda x: x[1][0]):
+           for label in items:
+               if label[0] in unlabeled:
+                   outfile.write("""\t%s :ref:`%s`\n""" % (label[0].ljust(30), label[0]))
+               else:
+                   outfile.write("""\t%s :ref:`%s <%s>`\n""" % (label[0].ljust(30), label[1][2],label[0]))
+
+       outfile.write('\t============================   =============================================================================================\n')
+
+       outfile.close()
+
+   def finish(self):
+       return
+
+
+def setup(app):
+   app.add_builder(CollectLabelsBuilder)
\ No newline at end of file



More information about the mapserver-commits mailing list