[Formed-commits] r413 - in trunk: . formed/formed/plugins/export

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon Oct 11 14:37:08 CEST 2010


Author: roland
Date: 2010-10-11 14:37:08 +0200 (Mon, 11 Oct 2010)
New Revision: 413

Modified:
   trunk/ChangeLog
   trunk/formed/formed/plugins/export/rules_sh.py
Log:
Added support to more opperators

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2010-10-06 12:22:24 UTC (rev 412)
+++ trunk/ChangeLog	2010-10-11 12:37:08 UTC (rev 413)
@@ -1,3 +1,8 @@
+2010-10-11  Roland Geider <roland.geider at intevation.de>
+
+	* formed/plugins/export/rules_sh.py: Added support to more opperators
+	  to be able to export the WASKO case
+
 2010-10-06  Torsten Irlaender <torsten at intevation.de>
 
 	* formed/formed/plugins/export/rules_sh.py (generate_tagging): Fixed

Modified: trunk/formed/formed/plugins/export/rules_sh.py
===================================================================
--- trunk/formed/formed/plugins/export/rules_sh.py	2010-10-06 12:22:24 UTC (rev 412)
+++ trunk/formed/formed/plugins/export/rules_sh.py	2010-10-11 12:37:08 UTC (rev 413)
@@ -66,12 +66,24 @@
     elif node.operator.__name__ == "EQ":
         operator = "="
         out.append("%s %s %s" % (recursive_parse(node.a, document), operator, recursive_parse(node.b, document)))
+    elif node.operator.__name__ == "NE":
+        operator = "!="
+        out.append("%s %s %s" % (recursive_parse(node.a, document), operator, recursive_parse(node.b, document)))
     elif node.operator.__name__ == "GE":
         operator = ">="
         out.append("%s %s %s" % (recursive_parse(node.a, document), operator, recursive_parse(node.b, document)))
     elif node.operator.__name__ == "DAYS":
         operator = "-"
         out.append("abs(%s %s %s)" % (recursive_parse(node.a, document), operator, recursive_parse(node.b, document)))
+    elif node.operator.__name__ == "ADD":
+        operator = "+"
+        out.append("%s %s %s" % (recursive_parse(node.a, document), operator, recursive_parse(node.b, document)))
+    elif node.operator.__name__ == "MINUS":
+        operator = "-"
+        out.append("%s %s %s" % (recursive_parse(node.a, document), operator, recursive_parse(node.b, document)))
+    elif node.operator.__name__ == "MUL":
+        operator = "*"
+        out.append("%s %s %s" % (recursive_parse(node.a, document), operator, recursive_parse(node.b, document)))
     else:
         raise Exception('Can not parse %s' % node) 
     return " ".join(out)



More information about the Formed-commits mailing list