[Thuban-devel] Proposed change for Extensions import and Extension registry

Jan-Oliver Wagner jan at intevation.de
Thu Nov 11 21:02:44 CET 2004


On Thu, Nov 11, 2004 at 09:01:52PM +0100, Jan-Oliver Wagner wrote:
> Attached is a patch for gns2shp that illustrates what
> I mean.

now it is.

-- 
Jan-Oliver Wagner               http://intevation.de/~jan/

Intevation GmbH                      http://intevation.de/
FreeGIS                                http://freegis.org/
-------------- next part --------------
Index: Extensions/gns2shp/__init__.py
===================================================================
RCS file: /home/thuban/jail/thubanrepository/thuban/Extensions/gns2shp/__init__.py,v
retrieving revision 1.1
diff -u -3 -p -r1.1 __init__.py
--- Extensions/gns2shp/__init__.py	4 Sep 2003 15:16:44 -0000	1.1
+++ Extensions/gns2shp/__init__.py	11 Nov 2004 19:51:36 -0000
@@ -1,6 +1,21 @@
-# Copyright (c) 2003 by Intevation GmbH
+# Copyright (c) 2003, 2004 by Intevation GmbH
 # Authors:
-# Jan-Oliver Wagner <jan at intevation.de>
+# Jan-Oliver Wagner <jan at intevation.de> (2003, 2004)
 #
-# This program is free software under the GPL (>=v2)
+# This program is free software under the GNU GPL (>=v2)
 # Read the file COPYING coming with Thuban for details.
+
+import gns2shp
+
+from Thuban import _
+from Thuban.UI.extensionregistry import ExtensionDesc, ext_registry
+
+ext_registry.add(ExtensionDesc(
+    name = 'gns2shp',
+    version = '1.0.0',
+    authors= [ 'Jan-Oliver Wagner' ],
+    copyright = '2003, 2004 Intevation GmbH',
+    desc = _("Converts GNS (Geographical Name Service\n" \
+             "of NIMA) to Shapefile format and\n" \
+             "displays the data.")))
+
Index: Extensions/gns2shp/gns2shp.py
===================================================================
RCS file: /home/thuban/jail/thubanrepository/thuban/Extensions/gns2shp/gns2shp.py,v
retrieving revision 1.4
diff -u -3 -p -r1.4 gns2shp.py
--- Extensions/gns2shp/gns2shp.py	28 Sep 2004 19:26:58 -0000	1.4
+++ Extensions/gns2shp/gns2shp.py	11 Nov 2004 19:51:36 -0000
@@ -1,8 +1,8 @@
-# Copyright (C) 2003 by Intevation GmbH
+# Copyright (C) 2003, 2004 by Intevation GmbH
 # Authors:
-# Jan-Oliver Wagner <jan at intevation.de>
+# Jan-Oliver Wagner <jan at intevation.de> (2003, 2004)
 #
-# This program is free software under the GPL (>=v2)
+# This program is free software under the GNU GPL (>=v2)
 # Read the file COPYING coming with Thuban for details.
 
 """
@@ -32,21 +32,8 @@ if __name__ != '__main__':
     from Thuban import _
     from Thuban.Model.layer import Layer
 
-from Thuban.UI.extensionregistry import ExtensionDesc, ext_registry
-
 import shapelib
 import dbflib
-
-
-ext_registry.add(ExtensionDesc(
-    name = 'gns2shp',
-    version = '1.0.0',
-    authors= [ 'Jan-Oliver Wagner' ],
-    copyright = '2003, 2004 Intevation GmbH',
-    desc = _("Converts GNS (Geographical Name Service\n" \
-             "of NIMA) to Shapefile format and\n" \
-             "displays the data.")))
-
 
 def gns2shp(src_fname, dest_fname):
     """Convert a file from gns textformat into a Shapefile.


More information about the Thuban-devel mailing list

This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)