Mercurial > hg > ZopePubmanConnector
annotate scripts/cleanPub.py @ 17:48c4a6f3b135
minor bug, handliung withdrawn entrie
| author | dwinter |
|---|---|
| date | Wed, 26 Jun 2013 15:10:35 +0200 |
| parents | 3e154b154b6f |
| children |
| rev | line source |
|---|---|
| 16 | 1 ''' |
| 2 Created on 14.06.2013 | |
| 3 | |
| 4 @author: dwinter | |
| 5 ''' | |
| 6 | |
| 7 | |
| 8 import web | |
| 9 | |
| 10 db = web.database(dbn='postgres', db='personalwww', user='dwinter',host="tuxserve03") | |
| 11 | |
| 12 | |
| 13 tab = db.select("pubmanbiblio_old") | |
| 14 | |
| 15 data =set() | |
| 16 | |
| 17 for res in tab: | |
| 18 if res.priority is not None: | |
| 19 data.add((res.key_main,res.escidocid,res.priority)) | |
| 20 | |
| 21 | |
| 22 for d in data: | |
| 23 db.insert("pubmanbiblio",key_main=d[0],escidocid=d[1],priority=d[2]) | |
| 24 | |
| 25 db.close() |
