- OWx?csydkZdklZdklZdklZdklZ defdYZ 7dZ <e dZ Dd efd YZ d Ze d Zd kTdkZdkZdkZdkZdklZdklZdklZdklZdklZdklZdkZdk Zdk!Z!dk"Z#dklZdklZdk$Z$de$_%dddddgZ&deeefdYZ'deeefdYZ(deeefdYZ)d eeefd!YZ*2d"Z+8d#Z,>d$Z-Ld%d&Z.Td'Z/bd(Z0xd)Z1d*Z2d+eeefd,YZ3d-eeefd.YZ4d/eeefd0YZ5d1Z6 d2Z7d3Z8d4Z9d5Z:$d6Z;)d7Z<.d8Z=6d9Z>Ad:Z?kd;Z@pd<ZAd=ZBd>ZCd?ZDd@ZEdAeeefdBYZFdCeeefdDYZG$dEZH)dFZI-dGZJ1dHZK4dIZL8dJZMJdKklNZNlZLdLZOdS(MN(sFolder(s SimpleItem(sPageTemplateFile(s PageTemplatesOSAS_ShowOnlinecs tZdZ  dZdZdZddZdZ!dZ%dZ )d Z ,d Z /d Z 2d Z RS( s OnlineBrowsercs   ||_dS(sinitialize a new instanceN(sidsself(sselfsid((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pys__init__ ssOSAS_ShowOnlinecs,tdi|}|SdS(s main views&products/OSA_system/OSAS_ViewFiles.zptN(sPageTemplateFiles__of__sselfspt(sselfspt((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pys index_htmlsics#t|d}|SdS(sload filesystemiN(s filesystem2sstartsk(sselfsstartsreloadsk((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pysgetfilesystem2scs t|}|SdS(sget the filetreeN(sbrowsesstartsk(sselfsstartsk((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pystreescs!!"#t|id|SdS(s&generates navigation bar for viewfilessURLN(spath_to_link_viewsselfsREQUESTspath(sselfspath((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pyspath_to_link_view!scs%&'t|SdS(scheck if digilibN(s isdigilib2spath(sselfspath((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pys isdigilib2%scs)*t|SdS(N(s changeNamesname(sselfsname((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pys changeName)scs,-t|SdS(N(s hasMetafilespath(sselfspath((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pys hasMetafile,scs/0t|SdS(N(s getMetafilespath(sselfspath((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pys getMetafile/scsK234|i|i||5|iii|idd|SdS(s%Oeffnen bzw. schlieen der SubfolderssURL1s?path=N(sselfstreespathstogglesfilesREQUESTsRESPONSEsredirect(sselfspathsfile((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pys toggle_view2s(s__name__s __module__s__doc__s__init__s meta_types index_htmlsgetfilesystem2streespath_to_link_views isdigilib2s changeNames hasMetafiles getMetafiles toggle_view(((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pysOSAS_ShowOnline s         cs,789tdi|}:|SdS(s"interface for adding the OSAS_roots*products/OSA_system/AddOSAS_ShowOnline.zptN(sPageTemplateFiles__of__sselfspt(sselfspt((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pysmanage_AddOSAS_ShowOnlineForm7scsP<=>t|}?|i||@|tj oA|idndS(sadd the OSAS_roots manage_mainN(sOSAS_ShowOnlinesidsnewObjsselfs _setObjectsRESPONSEsNonesredirect(sselfsidsRESPONSEsnewObj((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pysmanage_AddOSAS_ShowOnline<s sOSAS_StoreOnlinecsDtZdZEFdZJdZLdZQddZWdZ\dZ`dZ dd Z gd Z jd Z md Z rd ZvdZzdZ~dZdZdZdZdZdZRS(s!Webfrontend fr das StoragesystemcsFGH||_dS(sinitialize a new instanceN(sidsself(sselfsid((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pys__init__FssOSAS_StoreOnlinecs,LMNtdi|}O|SdS(s main views'products/OSA_system/OSAS_StoreFiles.zptN(sPageTemplateFiles__of__sselfspt(sselfspt((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pys index_htmlLsics#QRTt|d}U|SdS(sload filesystemiN(s filesystem2sstartsk(sselfsstartsreloadsk((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pysgetfilesystem2Qscs WXYt|}Z|SdS(sget the filetreeN(sbrowsesstartsk(sselfsstartsk((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pystreeWscs!\]^t|id|SdS(s&generates navigation bar for viewfilessURLN(spath_to_link_storesselfsREQUESTspath(sselfspath((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pyspath_to_link_store\scs`abt|SdS(scheck if digilibN(s isdigilib2spath(sselfspath((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pys isdigilib2`scsdet|SdS(N(s changeNamesname(sselfsname((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pys changeNamedscsght|SdS(N(s hasMetafilespath(sselfspath((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pys hasMetafilegscsjkt|SdS(N(s getMetafilespath(sselfspath((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pys getMetafilejscsKmno|i|i||p|iii|idd|SdS(s%Oeffnen bzw. schlieen der SubfolderssURL1s?path=N(sselfstreespathstogglesfilesREQUESTsRESPONSEsredirect(sselfspathsfile((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pys toggle_viewmscsrstt||SdS(sTest ob Eintrag ein Folder istN(sisFoldersselfspath(sselfspath((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pysisFolderrscsvwxt||SdS(sTest ob Eintrag ein Folder istN(sisScannedDocumentsselfspath(sselfspath((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pysisScannedDocumentvscsz{|t||SdS(sTest ob Eintrag ein Folder istN(s isFullTextspaths folder_name(sselfspaths folder_name((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pys isFullTextzscs,~tdi|}|SdS(sadd a new paths&products/OSA_system/OSAS_addFolder.zptN(sPageTemplateFiles__of__sselfspt(sselfspathspt((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pys addFolderForm~scstdtSdS(Ns%d.%m.%Y(sstrftimes localtime(sself((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pysdatescs)ti||||||SdS(s=add the folder to the filesystem and write the metadata filesN(s addFoldersselfspaths folder_names descriptionsarchive_creation_datescreator(sselfspaths folder_names descriptionsarchive_creation_datescreator((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pys addFolderscsy/tiii|d}|i}Wnd}nX||ii d<||ii d<t di |}|SdS(sEditiere das Index Metafiles /index.metass indexmetaspathsproducts/OSA_system/editindexN( sxmlsdomsminidomsparsespathstoxmls indexmetasselfsREQUESTsSESSIONsPageTemplateFiles__of__s newtemplate(sselfspathsdoms newtemplates indexmeta((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pys EditIndexs cs|iid o|id}n'|idi|_|id}t|iiddd}|i ||ii i |idd|iidSdS( s%Sichern der Aenderungen in Index.metas fileuploads indexmetaspaths /index.metaswsURL1s?path=N( sselfsREQUESTshas_keysnewtextsfilenames file_namesfilesSESSIONs indexmetas writelinessresponsesredirect(sselfsnewtexts indexmeta((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pys EditIndex2s cs,tdi|}|SdS(snothings(products/OSA_system/OSAS_addmetadata.zptN(sPageTemplateFiles__of__sselfspt(sselfspt((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pys add_metafiles(s__name__s __module__s__doc__s__init__s meta_types index_htmlsgetfilesystem2streespath_to_link_stores isdigilib2s changeNames hasMetafiles getMetafiles toggle_viewsisFoldersisScannedDocuments isFullTexts addFolderFormsdates addFolders EditIndexs EditIndex2s add_metafile(((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pysOSAS_StoreOnlineDs*                 cs,tdi|}|SdS(s"interface for adding the OSAS_roots+products/OSA_system/AddOSAS_StoreOnline.zptN(sPageTemplateFiles__of__sselfspt(sselfspt((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pysmanage_AddOSAS_StoreOnlineFormscsPt|}|i|||tj o|idndS(sadd the OSAS_roots manage_mainN(sOSAS_StoreOnlinesidsnewObjsselfs _setObjectsRESPONSEsNonesredirect(sselfsidsRESPONSEsnewObj((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pysmanage_AddOSAS_StoreOnlines (s*(sClassSecurityInfo(s RoleManager(sImplicit(s Persistent(sstrptime(sstrftimes/var/tmp/archivers .HSResources lost+foundsNetwork Trash FoldersTheFindByContentFoldersTheVolumeSettingsFoldersfsentrycstZdZdZdZdZdZdZeZ dZ e i ddZ e i ddZ e i ddZe i dd Ze i d d Ze i d d ZRS(sFile entry classscsptiitid|id}||_||_d|_ tii ||_ dS(sinitialize classs(.*)\nisN( sosspathsabspathsressearchsextpathsgroupsselfsallsusersgetmtimesmtime(sselfsextpath((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pys__init__s *   sgetPathcs|iSdS(sAusgabe von pathN(sselfspath(sself((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pysgetPathssgetUsercs|iSdS(sAusgabe von userN(sselfsuser(sself((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pysgetUserssgetDatecs&tdti|iSdS(sAusgabe von Dates %Y%m%d%H%MN(sstrftimestimesgmtimesselfsmtime(sself((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pysgetDatescs!|i|iSdS(s)Ausgabe einer eindeutigen Sortierbaren IDN(sselfsgetDatesgetPath(sself((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pysgetIDssgetTimecs|iSdS(sAusgabe von pathN(sselfstime(sself((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pysgetTimessgetAllcs|iSdS(sAusgabe von pathN(sselfsall(sself((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pysgetAlls(s__name__s __module__s__doc__spathsusersmonthsdatestimesClassSecurityInfossecuritys__init__s declarePublicsgetPathsgetUsersgetDatesgetIDsgetTimesgetAll(((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pysfsentrys(            s filesystemcsmtZdZhZhZeZdZdZddZ &ei d'dZ *ei d+dZ .ei d /d Z 3ei d 4d Z9d ZGdZeei dfdZnei dodZei ddZei ddZei ddZRS(sstore filesystemcs= tid|dd} |i} |SdS(sload filessystemsfind s -name '*' srN(sosspopensstartsfs readlinesslines(sselfsstartslinessf((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pysgetfsscsx|i|D]}tid|}|tj o|id}|id}|i i |o4|i |}|i|||i |t|i|djo?t|i|djd|i|j@o@|i|||?@d}Ag}Bt|}Cx|DC]{}DybEtiitii t i d|i do'F|i t|G|d}nWn HInXq1WJ|SdS(s&retrun list of entries of a filesystemis(.*)\niN(sisfssgetfssstartslinesslinesosspathsexistssabspathsressearchsgroupsappendsfsentry(sstartsfssislineslines((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pysentries>s   7 ics#LMOt|d}P|SdS(sload filesystemiN(s filesystemsstartsk(sstartsreloadsk((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pys getfilesystemLscsTUVg}Wh}Xx:|DX]/}Y|i|iZ|||is|d||dd||dd}u|d}qWv|SdS( s&generates navigation bar for showfilessiiiss/N( sstringsosspathsdirnamestmppathsisbasenamespathesslensappend(spathstmppathspathessstringsi((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pys path_to_linkbs"   "-cs1xyzd}|tii|}}d}~|tii|gg}xxt|dj o`|d}|djoPn|i |tii|gtii|}qQWxW|djoF|d|d||dd||dd}|d}qW|Sd S( s&generates navigation bar for viewfilessiiiss/N( sstringsosspathsdirnamestmppathsisbasenamespathesslensappendsURL(sURLspathsispathessstringstmppath((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pyspath_to_link_viewxs"   "5cs1d}tii|}d}|tii|gg}xxt|dj o`|d}|djoPn|i |tii|gtii|}qQWxW|djoF|d|d||dd||dd}|d}qW|Sd S( s&generates navigation bar for viewfilessiiiss/N( sstringsosspathsdirnamestmppathsisbasenamespathesslensappendsURL(sURLspathsispathessstringstmppath((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pyspath_to_link_stores"   "5sErrorcsHtZgZeZdZeiddZRS(Ncs|d|_dS(Ni(s initerrorsselfserror(sselfs initerror((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pys__init__ssgetErrorcs|iSdS(N(sselfserror(sself((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pysgetErrors(s__name__s __module__serrorsClassSecurityInfossecuritys__init__s declarePublicsgetError(((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pysErrors    s metacheckcsTtZgZeZdZdZeiddZRS(Ncsd}t|dj ox"|D]}||d}q0Wtid|}|iddjo d}n0|iddjo d }n d }||gSndd gSd S( sparse for errorsis
s (.*):(.*)isABORTserrorsDONEsoksrunningN( sretstrslensstrslinesressearchschecksgroupserror(sselfsstrserrorslinesretstrscheck((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pys parsearchives     csg|_t|tjoKtid|d}|iit ||i |i gn_xX|D]M}tid|d}|iit ||i |i gq}WdS(sarchive the documents in paths#/usr/local/mpiwg/archive/metacheck srN( sselfslinesstypespaths StringTypesosspopensfsappendsErrors parsearchives readliness singlepath(sselfspaths singlepathsf((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pys__init__s 2 smessagescs|iSdS(N(sselfslines(sself((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pysmessagess( s__name__s __module__slinessClassSecurityInfossecuritys parsearchives__init__s declarePublicsmessages(((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pys metachecks     sarchivecsTtZgZeZdZdZeiddZRS(Ncsd}t|dj ox"|D]}||d}q0Wtid|}|iddjo d}n0|iddjo d }n d }||gSndd gSd S( sparse for errorsis
s (.*):(.*)isABORTserrorsDONEsoksrunningN( sretstrslensstrslinesressearchschecksgroupserror(sselfsstrserrorslinesretstrscheck((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pys parsearchives     csg|_h|_||d<t|tjoFti|i|<t i d|d|i|dd}nZxS|D]H}ti|i|<t i d|d|i|dd}qWdS(sarchive the documents in pathsarchivers"/usr/local/mpiwg/archive/archiver s > s &srN( sselfsliness filenamesssessionstypespaths StringTypestempfilesmktempsosspopensfs singlepath(sselfspathssessions singlepathsf((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pys__init__s   0 smessagescs{g|_xX|iiD]D}|iit||it|i|di gq"W|iSdS(Nsr( sselfsliness filenamesskeysspathsappendsErrors parsearchivesopens readlines(sselfspath((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pysmessagess   B( s__name__s __module__slinessClassSecurityInfossecuritys parsearchives__init__s declarePublicsmessages(((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pysarchives     cst|SdS(N(sevalsstr(sstr((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pysevalextscsC  |ii} ||d|< ||d|<d|SdS(Nserror%ispath%iserror?number=%i(scontextsREQUESTsSESSIONssessionsretsispath(sretspathscontextsissession((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pys storeerror scs!|ii}||SdS(N(scontextsREQUESTsSESSIONssessionsstr(sstrscontextssession((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pysgeterrorscsSd}t|d}x$|iD]}||}q.W|SdS(Nssr(sretsopenspathsfs readlinessg(spathsgsretsf((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pysreadfiles   csRt|d}|i||i |id}!|SdS(Nswsarchive2( sopenspathsfswritestxtsclosesselfs aq_acquiresrval(sselfspathstxtsREQUESTsrvalsf((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pys writefiles  cs1$%&|id|iid<'t|SdS(s(check the metadata the documents in pathspathN(sselfsREQUESTsSESSIONs metacheckspath(sselfspath((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pys metachecker$scs8)*+t||ii},|iiidSdS(sarchive the documents in pathsarchive4N(sarchivespathsselfsREQUESTsSESSIONstmpsRESPONSEsredirect(sselfspathstmp((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pysarchiver)scsX.0d}1x;|D1]0}2|i|ijo3||i}nqW4|SdS(Ns(srcsnodelistsnodesnodeTypes TEXT_NODEsdata(snodelistsnodesrc((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pysgetText.s   cs~67d}9x]|D9]R};|i|ijo6<=|dt|idt|id}nqW?|dSdS(Nsss
s : s
( srcsnodelistsnodesnodeTypes ELEMENT_NODEsstrsnodeNamesgetTexts childNodes(snodelistsnodesrc((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pysgetBib6s  7c s_ABCg}Dtii|d o FdSn'Htid|dd}I|i}Jti i i |}Kt |i ddi}Lt |i ddi}Mt |i ddi}Nt |i d di} Oy#Pt |i d di}WnQRd }nXS|d joTd |d}n7U|djoVd|d}nXd |d}Z|d|d|d}[|d| d}\y]|i ddi dd} ^| iido#_|d| idid}na|d}b|t| i}Wn denXi|SdS(sget index.metas /index.metas NO_METADATAscat srsnameiscreatorsarchive-creation-dates descriptions content-typessscanned documents

Document: s

sfolders

Folder: s

created by: s at: s

s

Description

s

smetasbibstypes

Info (s)

s

Info

N(shtmlsosspathsexistsspopensfsreadslinessxmlsdomsminidoms parseStringsgetTextsgetElementsByTagNames childNodessnamescreators creation_dates descriptionstypesbibs attributesshas_keysvaluesgetBib( spathsfsnamescreatorstypesdomsliness creation_dateshtmlsbibs description((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pys getMetafileAs>  # ## cs!klmtii|dSdS(sget index.metas /index.metaN(sosspathsexists(spath((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pys hasMetafileksc spqrygsti|}uddddddddd g }vd }wxE|Dw]:}ytii|}{|d |jo |d SnqUW~yt i i i tii |d d }x|idD]q}t|idd idjoEt|idd itii |d jo d SnnqWd SWnd SnXWnd SnXdS(s9check if folder is candidate for digilib without metadatas.gifs.jpgs.jpegs.pngs.tiffs.tifs.JPGs.TIFFs.TIFsiis /index.metasdirs content-typesimagessnameN(sosslistdirspathsdirs imagesuffixessretsassplitextssuffixsxmlsdomsminidomsparsessplitsgetElementsByTagNamesnodesgetTexts childNodes(spathsasnodessuffixsdomsrets imagesuffixessdir((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pys isdigilib2ps,$  , &6 csytiii|d}xu|idD]a}t|iddidjo5t|iddi|jo dSnnq;WdSWndSnXdS( s(check if foldername in path is full texts /index.metasdirs content-typeisfulltextsnameiN( sxmlsdomsminidomsparsespathsgetElementsByTagNamesnodesgetTexts childNodess folder_name(spaths folder_namesnodesdom((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pys isFullTexts && csytiii|d}x|idD]x}y_t|iddidjo5t|iddi|jo dSnnWn nXq;WdSWndSnXdS( s(check if foldername in path is full texts /index.metasdirs content-typeis presentationsnameiN( sxmlsdomsminidomsparsespathsgetElementsByTagNamesdirnodesgetTexts childNodess folder_name(spaths folder_namesdomsdirnode((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pysisPresentations &&  cs{y]tid|}|tjo$dtid|idSn|idSWndSnXdS(Ns(.*)/mpiwg/online/(.*)s digifiles/s%(.*)/mpiwg/production/docuserver/(.*)isNO(sressearchspathstemp2sNonesgroup(spathstemp2((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pys changeNames$csPd|_|ididd|ididddSdS(NisOFSPsneusHELLOsok(sselfsismanage_addProductsmanage_addDTMLMethodsgetattrs manage_edit(sself((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pystests slscstZdZdZdZdZdZdZeZ dZ e i ddZ e i ddZ e i ddZe i d d ZRS( sFile entry classscsDti|_||d<tid|idddS(Nsoutfiles ls -R / >s &sr(stempfilesmktempsselfsoutfilesstartsosspopen(sselfsstart((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pys__init__s sreadcs|iiSdS(N(sselfsfsread(sself((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pysreadssretselfcs|SdS(N(sself(sself((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pysretselfssallcs>d}x!|iD]}||}qW|SdS(Ns(sretsselfsfsg(sselfsgsret((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pysalls   s printOutfilecsEx"tii|i oq Wt|iiSdS(N(sosspathsexistssselfsoutfilesopens readlines(sself((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pys printOutfiles(s__name__s __module__s__doc__spathsusersmonthsdatestimesClassSecurityInfossecuritys__init__s declarePublicsreadsretselfsalls printOutfile(((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pyslss           soverviewcstZgZhZeZdZdZdZei ddZ  ei d!dZ RS(NcsTti|}x5|D]*}|d||i|i||s (.*):(.*)isABORTserrorsDONEsoksrunningN( sretstrslensstrslinesressearchschecksgroupserror(sselfsstrserrorslinesretstrscheck((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pys parsearchives     smessagescsg|_xa|iiD]M}|i|}|iit||it |di gq"W|iSdS(Nsr( sselfsliness resourcesskeyssnamespathsappendsErrors parsearchivesopens readlines(sselfspathsname((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pysmessagess   ;s printResourcecs!"|iSdS(N(sselfs resources(sself((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pys printResource!s( s__name__s __module__sdirs resourcessClassSecurityInfossecuritys__init__s getResources parsearchives declarePublicsmessagess printResource(((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pysoverviews       cs$&t|SdS(N(soverviewspath(spath((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pys getoverview$scs2)*t|ii}+|iiidSdS(Nsnext(slssselfsREQUESTsSESSIONstmpsRESPONSEsredirect(sselfstmp((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pysls_test)scs!-.||iid</dSdS(Ns somethingi(s somethingsselfsREQUESTsSESSION(sselfs something((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pys storeFile-scs12|iidSdS(Ns something(sselfsREQUESTsSESSION(sself((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pysgetFile1scs456t|| SdS(shreturns TRUE, wenn path ein Folder ist in den weitere Objekte Folder oder Dokumente gelegt werden drfenN(sisScannedDocumentsselfspath(sselfspath((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pysisFolder4scs89:y;t|dd}<|i}>yj?tiii|}@t |i ddi }A|djp |djo BdSnDdSWnEFdSnXWnGHdSnXdS( sFreturns TRUE, wenn path der Stammordner eines gescannten Documents ists /index.metasrs content-typeisscanned-documentsscanned documentiN( sfilespathsfsreadslinessxmlsdomsminidoms parseStringsgetTextsgetElementsByTagNames childNodess content_type(sselfspaths content_typesdomsfslines((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pysisScannedDocument8s  (s localtimesstrftimecsLMtdtSdS(Ns%d.%m.%Y(sstrftimes localtime(sself((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pysdateLs(Ps addFolders OFS.FoldersFoldersOFS.SimpleItems SimpleItems'Products.PageTemplates.PageTemplateFilesPageTemplateFiles#Products.PageTemplates.PageTemplates PageTemplatesOSAS_ShowOnlinesmanage_AddOSAS_ShowOnlineFormsNonesmanage_AddOSAS_ShowOnlinesOSAS_StoreOnlinesmanage_AddOSAS_StoreOnlineFormsmanage_AddOSAS_StoreOnlinestypessurllibsosssyssres AccessControlsClassSecurityInfosAccessControl.Roles RoleManagers AcquisitionsImplicitsGlobalss Persistentstimesstrptimesstrftimesos.pathsdircachesxml.dom.minidomsxmlstempfilestempdirs exclusionsfsentrys filesystems filesystem2sbrowsesgetfssshowallsentriess getfilesystems sort_by_dates path_to_linkspath_to_link_viewspath_to_link_storesErrors metachecksarchivesevalexts storeerrorsgeterrorsreadfiles writefiles metacheckersarchiversgetTextsgetBibs getMetafiles hasMetafiles isdigilib2s isFullTextsisPresentations changeNamestestslssoverviews getoverviewsls_tests storeFilesgetFilesisFoldersisScannedDocuments localtimesdate(Cs hasMetafilestempfilesOSAS_ShowOnlinesoverviewsshowalls getfilesystemslss RoleManagers getoverviewsmanage_AddOSAS_StoreOnlineFormsisScannedDocumentsFolders PageTemplatesarchivesxmls addFolders exclusionspath_to_link_viewsbrowsesstrptimesmanage_AddOSAS_StoreOnlinesurllibs sort_by_datesevalextsgetfssgetTextsarchiversmanage_AddOSAS_ShowOnlinestimestests storeFiles isdigilib2sImplicitsPageTemplateFilesisFolders metachecksOSAS_StoreOnlines storeerrorsreadfiles path_to_linksClassSecurityInfos Persistentsfsentryssyss SimpleItems writefilesgeterrors filesystem2sErrorsdatesres isFullTexts getMetafilesls_tests localtimesmanage_AddOSAS_ShowOnlineFormsgetBibsdircachespath_to_link_stores changeNamesisPresentations filesystemsgetFilesentriess metacheckersossstrftime((sO/Users/dwinter/install/CVSZOPE/Zope/lib/python/Products/OSA_system/OSAS_show.pys?s. g            /U8        (.         *  "   #6