version 1.38, 2004/10/29 14:24:32
|
version 1.41, 2005/01/20 13:40:08
|
Line 14 from Products.PageTemplates.PageTemplate
|
Line 14 from Products.PageTemplates.PageTemplate
|
from Products.PageTemplates.PageTemplate import PageTemplate |
from Products.PageTemplates.PageTemplate import PageTemplate |
import string |
import string |
import urllib |
import urllib |
|
import zLOG |
import xml.dom.minidom |
import xml.dom.minidom |
from time import localtime,strftime |
from time import localtime,strftime |
from Globals import package_home |
from Globals import package_home |
Line 52 def getISO():
|
Line 53 def getISO():
|
|
|
ret={} |
ret={} |
for lineraw in f: |
for lineraw in f: |
line=lineraw.encode('ascii','replace') |
line=lineraw.encode('ascii','replace').strip() |
value=string.split(line,'\t')[0].encode('ascii','replace') |
value=string.split(line,'\t')[0].encode('ascii','replace') |
key=string.split(line,'\t')[1].encode('ascii','replace') |
key=string.split(line,'\t')[1].encode('ascii','replace') |
ret[key]=value |
ret[key]=value |
Line 205 def add6(self):
|
Line 206 def add6(self):
|
metapath=self.add_metadata['archive-path']+"/"+self.add_metadata['folder_name']+"/index.meta" |
metapath=self.add_metadata['archive-path']+"/"+self.add_metadata['folder_name']+"/index.meta" |
|
|
f=open(metapath,'w') |
f=open(metapath,'w') |
f.write(renderxml) |
f.write(renderxml.encode('utf-8')) |
f.close() |
f.close() |
os.chmod(metapath,0664) |
os.chmod(metapath,0664) |
os.popen('chmod -R 0775 %s'%self.add_metadata['archive-path']+"/"+self.add_metadata['folder_name']) |
os.popen('chmod -R 0775 %s'%self.add_metadata['archive-path']+"/"+self.add_metadata['folder_name']) |
Line 695 def combineTextImage2(self,path):
|
Line 696 def combineTextImage2(self,path):
|
if self.REQUEST.has_key('image'): # falls bilder |
if self.REQUEST.has_key('image'): # falls bilder |
path=re.sub('//','/',self.REQUEST['path']) # falls '//' im Pfad |
path=re.sub('//','/',self.REQUEST['path']) # falls '//' im Pfad |
dlpath = re.sub('/mpiwg/online/','',path)+"/"+self.REQUEST['image'] |
dlpath = re.sub('/mpiwg/online/','',path)+"/"+self.REQUEST['image'] |
os.popen("ssh archive@nausikaa2.rz-berlin.mpg.de /usr/local/mpiwg/scripts/scaleomat -src=/mpiwg/online -dest=/mpiwg/temp/online/scaled/thumb -dir=%s -scaleto=90 -replace >> /tmp/sc.out &"%dlpath ) |
|
#os.popen("ssh archive@nausikaa2.rz-berlin.mpg.de /usr/local/mpiwg/scripts/scaleomat.pl %s /mpiwg/temp/online/scaled/thumb 90 >> /tmp/sc.out &"% re.sub('/mpiwg/online/','',self.REQUEST['path']+"/"+self.REQUEST['image'])) |
zLOG.LOG('OSas',zLOG.INFO,"ssh archive@nausikaa2.rz-berlin.mpg.de /usr/local/mpiwg/scripts/scaleomat -src=/mpiwg/online -dest=/mpiwg/temp/online/scaled/thumb -dir=%s -scaleto=90 -sync >> /tmp/sc.out &"%dlpath ) |
|
ret=os.popen("ssh archive@nausikaa2.rz-berlin.mpg.de /usr/local/mpiwg/scripts/scaleomat -src=/mpiwg/online -dest=/mpiwg/temp/online/scaled/thumb -dir=%s -scaleto=90 -sync >> /tmp/sc.out &"%dlpath ).read() |
|
zLOG.LOG('OSAS (combine)',zLOG.INFO,ret) |
|
|
|
|
|
|
else: # falls keine Bilder (bug in reg.cgi info file ersetzen) |
else: # falls keine Bilder (bug in reg.cgi info file ersetzen) |
f=file("/tmp/tmp_info.xml","w") |
f=file("/tmp/tmp_info.xml","w") |