diff scripts/cleanPub.py @ 16:3e154b154b6f

timeouts
author dwinter
date Fri, 14 Jun 2013 12:27:01 +0200
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/cleanPub.py	Fri Jun 14 12:27:01 2013 +0200
@@ -0,0 +1,25 @@
+'''
+Created on 14.06.2013
+
+@author: dwinter
+'''
+
+
+import web
+
+db = web.database(dbn='postgres', db='personalwww', user='dwinter',host="tuxserve03")
+
+
+tab = db.select("pubmanbiblio_old")
+
+data =set()
+
+for res in tab:
+    if res.priority is not None:
+        data.add((res.key_main,res.escidocid,res.priority))
+        
+        
+for d in data:
+    db.insert("pubmanbiblio",key_main=d[0],escidocid=d[1],priority=d[2])
+    
+db.close()
\ No newline at end of file