version 1.4, 2004/03/19 21:28:21
|
version 1.6, 2004/04/14 21:38:02
|
Line 4 import os.path
|
Line 4 import os.path
|
import re |
import re |
import urllib |
import urllib |
|
|
def getISO(): # very bad made has to be configured |
|
"""ISO""" |
|
try: |
|
f=file('/usr/local/mpiwg/Zope/lib/python/Products/OSA_system/iso639-1.inc','r').readlines() |
|
#f=file('OSA_system/iso639-1.inc','r').readlines() |
|
ret={} |
|
for lineraw in f: |
|
line=lineraw.encode('ascii','replace') |
|
value=string.split(line,'\t')[0].encode('ascii','replace') |
|
key=string.split(line,'\t')[1].encode('ascii','replace') |
|
ret[key]=value |
|
except: |
|
ret={} |
|
return ret |
|
|
|
def readArchimedesXML(folder): |
def readArchimedesXML(folder): |
"""gib URL aus """ |
"""gib URL aus """ |
Line 93 def changeNodesInIndexMeta(path,node,sub
|
Line 79 def changeNodesInIndexMeta(path,node,sub
|
"""nothing""" |
"""nothing""" |
|
|
namenode=dom.createElement(re.sub(r' ','-',subnode)) |
namenode=dom.createElement(re.sub(r' ','-',subnode)) |
namenodetext=dom.createTextNode(subnodes[subnode].decode("utf8")) |
namenodetext=dom.createTextNode(unicode(subnodes[subnode],"utf8")) |
namenode.appendChild(namenodetext) |
namenode.appendChild(namenodetext) |
root.appendChild(namenode) |
root.appendChild(namenode) |
|
|
Line 113 def changeNodesInIndexMeta(path,node,sub
|
Line 99 def changeNodesInIndexMeta(path,node,sub
|
for subnode in subnodes.keys(): |
for subnode in subnodes.keys(): |
|
|
namenode=dom.createElement(re.sub(r' ','-',subnode)) |
namenode=dom.createElement(re.sub(r' ','-',subnode)) |
namenodetext=dom.createTextNode(subnodes[subnode].decode("utf8")) |
namenodetext=dom.createTextNode(unicode(subnodes[subnode],"utf8")) |
namenode.appendChild(namenodetext) |
namenode.appendChild(namenodetext) |
nodeNew.appendChild(namenode) |
nodeNew.appendChild(namenode) |
|
|