[Thuban-commits] r2812 - in trunk/thuban: . Doc/manual Extensions/export_shapefile Extensions/importAPR Extensions/ogr Thuban packaging/windows

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Sat Jan 19 02:16:00 CET 2008


Author: bernhard
Date: 2008-01-19 02:15:56 +0100 (Sat, 19 Jan 2008)
New Revision: 2812

Added:
   trunk/thuban/Thuban/thuban_cfg.py
Modified:
   trunk/thuban/ChangeLog
   trunk/thuban/Doc/manual/thuban-manual-de.xml
   trunk/thuban/Doc/manual/thuban-manual.xml
   trunk/thuban/Extensions/export_shapefile/export_shapefile.py
   trunk/thuban/Extensions/importAPR/importAPR.py
   trunk/thuban/Extensions/ogr/ogrstart.py
   trunk/thuban/README
   trunk/thuban/packaging/windows/thubanstart.py
Log:
New installation wide configuration file thuban_cfg.py which by
default tries to import all interesting Extensions coming with Thuban.

Extentions are now all under the menu entry with the same name,
their maturity will be indicated by leading string in the menu text.

* Thuban/thuban_cfg.py: New. Tries to import each interesting
Extension (in a non-elegant way).

* packaging/windows/thubanstart.py: Disabled import of default
extensions as this is done in thuban_cfg.py now.

* README: Mentioned thuban_cfg.py instead of the ugly method
of thubanstart.py for each user's home directory.

*  Extensions/export_shapefile/export_shapefile.py,
Extensions/importAPR/importAPR.py: Moved them under "Extensions" menu,
but marked them "(experimental) " in the menu entry text. Bumped
copyright to include 2008.

* Extensions/ogr/ogrstart.py: Separated the "(testing) " marking
string from the rest of the menu entry.

*  Doc/manual/thuban-manual.xml: Updated manual to include
thuban_cfg.py and different handling of Extensions. Bumped copyright
to include 2008.


Modified: trunk/thuban/ChangeLog
===================================================================
--- trunk/thuban/ChangeLog	2008-01-19 00:03:03 UTC (rev 2811)
+++ trunk/thuban/ChangeLog	2008-01-19 01:15:56 UTC (rev 2812)
@@ -1,8 +1,40 @@
 2008-01-19   Bernhard Reiter <bernhard at intevation.de>
 
-	* versions.py(verify_versions): Updated reference revisions for checking
-	the loaded libraries according to the README.
+	New installation wide configuration file thuban_cfg.py which by
+	default tries to import all interesting Extensions coming with Thuban.
 
+	Extentions are now all under the menu entry with the same name,
+	their maturity will be indicated by leading string in the menu text.
+
+	* Thuban/versions.py(verify_versions): Updated reference revisions 
+	for checking the loaded libraries according to the README.
+
+	* Thuban/UI/application.py: Started using the logging module for
+	error message and runtime information.
+	(read_startup_files): Trying to read new site wide startup file
+	Thuban/thuban_cfg.py.
+
+	* Thuban/thuban_cfg.py: New. Tries to import each interesting
+	Extension (in a non-elegant way).
+
+	* packaging/windows/thubanstart.py: Disabled import of default
+	extensions as this is done in thuban_cfg.py now.
+
+	* README: Mentioned thuban_cfg.py instead of the ugly method
+	of thubanstart.py for each user's home directory.
+
+	*  Extensions/export_shapefile/export_shapefile.py,
+	Extensions/importAPR/importAPR.py: Moved them under "Extensions" menu,
+	but marked them "(experimental) " in the menu entry text. Bumped
+	copyright to include 2008.
+
+	* Extensions/ogr/ogrstart.py: Separated the "(testing) " marking
+	string from the rest of the menu entry.
+
+	*  Doc/manual/thuban-manual.xml: Updated manual to include
+	thuban_cfg.py and different handling of Extensions. Bumped copyright
+	to include 2008.
+
 2008-01-09   Bernhard Reiter <bernhard at intevation.de>
 
 	Making Thuban robust against shapefiles which contain empty shapes.

Modified: trunk/thuban/Doc/manual/thuban-manual-de.xml
===================================================================
--- trunk/thuban/Doc/manual/thuban-manual-de.xml	2008-01-19 00:03:03 UTC (rev 2811)
+++ trunk/thuban/Doc/manual/thuban-manual-de.xml	2008-01-19 01:15:56 UTC (rev 2812)
@@ -1750,7 +1750,7 @@
 
 	<section><title>Eigene Erweiterungen über thubanstart.py</title>
 		<para>
-		iNachdem Thuban zum ersten mal gestartet wurde, wird
+		Nachdem Thuban zum ersten mal gestartet wurde, wird
 		ein Verzeichnis .thuban im Heimatverzeichnis des
 		Benutzers erzeugt.
 		Dort kann die Datei thubanstart.py angelegt werden,

Modified: trunk/thuban/Doc/manual/thuban-manual.xml
===================================================================
--- trunk/thuban/Doc/manual/thuban-manual.xml	2008-01-19 00:03:03 UTC (rev 2811)
+++ trunk/thuban/Doc/manual/thuban-manual.xml	2008-01-19 01:15:56 UTC (rev 2812)
@@ -19,7 +19,7 @@
       </author>
 	</authorgroup>
     <copyright>
-      <year>2003, 2004, 2005, 2006, 2007</year>
+      <year>2003, 2004, 2005, 2006, 2007, 2008</year>
       <holder>Intevation GmbH</holder>
     </copyright>
    <revhistory>
@@ -32,6 +32,13 @@
      </revision>
 -->
      <revision>
+        <revnumber>1.2.1</revnumber>
+        <date>19-Jan-2008</date>
+        <revremark>
+		Extensions are handled slightly differently with Thuban 1.2.1.
+	</revremark>
+     </revision>
+     <revision>
         <revnumber>1.2.0</revnumber>
         <date>20-Feb-2007</date>
         <revremark>
@@ -1393,15 +1400,19 @@
 	<section><title>Extensions included in Thuban package</title>
 		<para>
 		The extensions described in this section are part of the
-		Thuban package, but not activated by default.
-		You will find them in the Thuban installation directory
-		under <literal>Extensions/</literal>. Activate them as personal
-		extensions via PYTHONPATH as described in the previous section.
-		Stable extensions will appear under the menu
+		Thuban package. Since version 1.2.1, Thuban will attempt
+		to import all interesting extensions. The administrator can
+		configure this for the installation in the file thuban_cfg.py.
+
+		You will find the code of the extentions in the Thuban 
+		installation directory under <literal>Extensions/</literal>. 
+		If they are not imported by thuban_cfg.py you can activate
+		them as personal personal extensions 
+		via PYTHONPATH as described in the previous section.
+		Extensions will appear under the menu
 		<menuchoice><guimenu>Extensions</guimenu></menuchoice> and
- 		extensions which are in experimental state and therefore
-		not fully functional under
-		<menuchoice><guimenu>Experimental</guimenu></menuchoice>.
+ 		extensions which are in the state of being experimental 
+		or testing will be indicated as such in their menu entry text.
 		</para>
 
 		<section><title>Stable extensions</title>

Modified: trunk/thuban/Extensions/export_shapefile/export_shapefile.py
===================================================================
--- trunk/thuban/Extensions/export_shapefile/export_shapefile.py	2008-01-19 00:03:03 UTC (rev 2811)
+++ trunk/thuban/Extensions/export_shapefile/export_shapefile.py	2008-01-19 01:15:56 UTC (rev 2812)
@@ -1,4 +1,4 @@
-# Copyright (C) 2005 by Intevation GmbH
+# Copyright (C) 2005, 2008 by Intevation GmbH
 # Authors:
 # Jan-Oliver Wagner <jan at intevation.de> (2005)
 #
@@ -87,13 +87,13 @@
 
 
 # register the new command
-registry.Add(Command('ExportShapefile', _('Export Layer as Shapefile ...'),
+registry.Add(Command('ExportShapefile',  _("(experimental) ")+ _('Export Layer as Shapefile ...'),
                      ExportLayerAsShapefile,
                      helptext = _('Export the active layer as a Shapefile')))
 
-# find the experimental menu (create it anew if not found)
-experimental_menu = main_menu.FindOrInsertMenu("experimental", \
-                                              _("Experimenta&l"))
+# find the entension menu (create it anew if not found)
+extensions_menu = main_menu.FindOrInsertMenu('extensions',
+                                               _('E&xtensions'))
 
-# finally add the new entry to the extensions menu
-experimental_menu.InsertItem('ExportShapefile')
+# finally add the new entry to the menu
+extensions_menu.InsertItem('ExportShapefile')

Modified: trunk/thuban/Extensions/importAPR/importAPR.py
===================================================================
--- trunk/thuban/Extensions/importAPR/importAPR.py	2008-01-19 00:03:03 UTC (rev 2811)
+++ trunk/thuban/Extensions/importAPR/importAPR.py	2008-01-19 01:15:56 UTC (rev 2812)
@@ -1,4 +1,4 @@
-# Copyright (C) 2003-2005 by Intevation GmbH
+# Copyright (C) 2003-2005, 2008 by Intevation GmbH
 # Authors:
 # Jan-Oliver Wagner <jan at intevation.de> (2003, 2004)
 #
@@ -327,12 +327,12 @@
 apr_import_extension = ODBExtension('APR Import')
 
 # register the new command
-registry.Add(Command('import-apr', _('Import apr-file...'), import_apr_dialog,
+registry.Add(Command('import-apr', _("(experimental) ")+_('Import apr-file...'), import_apr_dialog,
                          helptext = _('Import a ArcView project file')))
 
-# find the experimental menu (create it anew if not found)
-experimental_menu = main_menu.FindOrInsertMenu('experimental',
-                                               _('Experimenta&l'))
+# find the extension menu (create it anew if not found)
+extensions_menu = main_menu.FindOrInsertMenu('extensions',
+                                               _('E&xtensions'))
 
-# finally add the new entry to the experimental menu
-experimental_menu.InsertItem('import-apr')
+# finally add the new entry to the menu
+extensions_menu.InsertItem('import-apr')

Modified: trunk/thuban/Extensions/ogr/ogrstart.py
===================================================================
--- trunk/thuban/Extensions/ogr/ogrstart.py	2008-01-19 00:03:03 UTC (rev 2811)
+++ trunk/thuban/Extensions/ogr/ogrstart.py	2008-01-19 01:15:56 UTC (rev 2812)
@@ -1,4 +1,4 @@
-# Copyright (c) 2004,2006,2007 by Intevation GmbH    vim:encoding=latin-1:
+# Copyright (c) 2004,2006,2007 by Intevation GmbH    vim:encoding=iso-8859-15:
 # Authors:
 # Nina Hüffmeyer <nhueffme at intevation.de>
 #
@@ -201,7 +201,7 @@
 #ogr_menu = Menu("ogr", _("Open layer via OGR"),[])
 # as long as there we are not stable, better add to "Extentions" marked "beta"
 map_menu = main_menu.FindOrInsertMenu('extensions', _('E&xtensions'))
-ogr_menu = Menu("ogr", _("(testing) Open layer via OGR"),[])
+ogr_menu = Menu("ogr", _("(testing) ") + _("Open layer via OGR"),[])
 
 
 ogrsupport = ogrshapes.has_ogr_support()

Modified: trunk/thuban/README
===================================================================
--- trunk/thuban/README	2008-01-19 00:03:03 UTC (rev 2811)
+++ trunk/thuban/README	2008-01-19 01:15:56 UTC (rev 2812)
@@ -118,10 +118,10 @@
 Releasenotes.txt and the Doc/technotes/release-process.txt 
 might also contain interesting hints.
 
-To make users see the power of Thuban's extensions we recommend to 
-enable all extensions coming with Thuban by default - even the 
-more experimental ones. One suboptimal approach would be 
-by a thubanstart.py file for the user's home directory.
+Since Thuban 1.2.1 there is a file thuban_cfg.py which can be used
+for the installation wide configuration of Thuban. By default it enables
+all interesting extensions. Administrators should edit this files to their
+need, e.g. when they want to not show some extensions by default.
 
 License
 -------

Added: trunk/thuban/Thuban/thuban_cfg.py
===================================================================
--- trunk/thuban/Thuban/thuban_cfg.py	2008-01-19 00:03:03 UTC (rev 2811)
+++ trunk/thuban/Thuban/thuban_cfg.py	2008-01-19 01:15:56 UTC (rev 2812)
@@ -0,0 +1,60 @@
+# Copyright (C) 2008 by Intevation GmbH
+# Author(s):
+# Bernhard Reiter <bernhard at intevation.de>
+#
+# This program is free software under the GPL (>=v2)
+# Read the file COPYING coming with the software for details.
+
+"""
+Installation wide configuration file.
+"""
+
+try:
+    import Extensions.bboxdump
+except Exception, x:
+    print x
+
+try:
+    import Extensions.export_shapefile
+except Exception, x:
+    print x
+
+try:
+    import Extensions.gns2shp
+except Exception, x:
+    print x
+
+try:
+    import Extensions.importAPR
+except Exception, x:
+    print x
+
+try:
+    import Extensions.mouseposition
+except Exception, x:
+    print x
+
+try:
+    import Extensions.ogr
+except Exception, x:
+    print x
+
+# no import of profiling, because it uses the non-free profiling module
+# of python which does not come with some distributions.
+
+try:
+    import Extensions.svgexport
+except Exception, x:
+    print x
+
+try:
+    import Extensions.umn_mapserver
+except Exception, x:
+    print x
+
+# disabled for 1.2.1 release because PyOGCLib is buggy
+#try:
+#    import Extensions.wms
+#except Exception, x:
+#    print x
+

Modified: trunk/thuban/packaging/windows/thubanstart.py
===================================================================
--- trunk/thuban/packaging/windows/thubanstart.py	2008-01-19 00:03:03 UTC (rev 2811)
+++ trunk/thuban/packaging/windows/thubanstart.py	2008-01-19 01:15:56 UTC (rev 2812)
@@ -1,17 +1,17 @@
-# This file must be copied into 
+# This example file can be copied into 
 # C:\Documents and Settings\username\Application Data\thuban
 
 ###############################################################################
-#  DEFAULT THUBAN EXTENSIONS
+# DEFAULT THUBAN EXTENSIONS (since 1.2.1 per default enabled in thuban_cfg.py.)
 ###############################################################################
-import Extensions.gns2shp
-import Extensions.umn_mapserver
-import Extensions.wms
-import Extensions.bboxdump
-import Extensions.mouseposition
-import Extensions.profiling
-import Extensions.svgexport
-import Extensions.ogr
+#import Extensions.gns2shp
+#import Extensions.umn_mapserver
+#import Extensions.wms
+#import Extensions.bboxdump
+#import Extensions.mouseposition
+##import Extensions.profiling
+#import Extensions.svgexport
+#import Extensions.ogr
 
 ###############################################################################
 #  PERSONAL EXTENSIONS 



More information about the Thuban-commits mailing list