- {?csdkZdklZdklZdklZdklZ dk l Z  dk l Z  defdYZ =e e ?d ZDed ZLd efd YZe ed ZedZdZdkTdkZdkZdkZdkZdk l Z dklZdklZdk lZdkl Z dkl!Z!dkZdk"Zdk#Z#dk$Z%dklZdklZdk&Z&de&_'dddddgZ(deeefdYZ)4deeefdYZ*d eeefd!YZ+0d"eeefd#YZ,hd$Z-pd%Z.vd&Z/d'd(Z0d)Z1d*Z2d+Z3d,Z4d-eeefd.YZ5d/eeefd0YZ6d1eeefd2YZ7>d3Z8Ad4Z9Hd5Z:Ld6Z;Td7Z<\d8Z=ad9Z>fd:Z?nd;Z@yd<ZAd=ZBd>ZCd?ZDd@ZEdAZF dBZGdCeeefdDYZH5dEeeefdFYZIkdGZJpdHZKtdIZLxdJZM{dKZNdLZOdMklPZPl!Z!dNZQdS(ON(sFolder(s SimpleItem(sPageTemplateFile(s PageTemplate(sClassSecurityInfo(sInitializeClasssOSAS_ShowOnlinecs tZ eZdZdZeidddZddZ"dZ 'd Z +d Z /d Z 2d Z 5d Z8dZRS(Ncs||_dS(sinitialize a new instanceN(sidsself(sselfsid((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pys__init__ssOSAS_ShowOnlinesViews index_htmlcs,tdi|}|SdS(s main views&Products/OSA_system/OSAS_ViewFiles.zptN(sPageTemplateFiles__of__sselfspt(sselfspt((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pys index_htmlsics#t|d} |SdS(sload filesystemiN(s filesystem2sstartsk(sselfsstartsreloadsk((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pysgetfilesystem2scs "#$t|}%|SdS(sget the filetreeN(sbrowsesstartsk(sselfsstartsk((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pystree"scs!'()t|id|SdS(s&generates navigation bar for viewfilessURLN(spath_to_link_viewsselfsREQUESTspath(sselfspath((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pyspath_to_link_view'scs+,-t|SdS(scheck if digilibN(s isdigilib2spath(sselfspath((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pys isdigilib2+scs/0t|SdS(N(s changeNamesname(sselfsname((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pys changeName/scs23t|SdS(N(s hasMetafilespath(sselfspath((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pys hasMetafile2scs56t|SdS(N(s getMetafilespath(sselfspath((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pys getMetafile5scsK89:|i|i||;|iii|idd|SdS(s%Oeffnen bzw. schlieen der SubfolderssURL1s?path=N(sselfstreespathstogglesfilesREQUESTsRESPONSEsredirect(sselfspathsfile((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pys toggle_view8s(s__name__s __module__sClassSecurityInfossecuritys__init__s meta_typesdeclareProtecteds index_htmlsgetfilesystem2streespath_to_link_views isdigilib2s changeNames hasMetafiles getMetafiles toggle_view(((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pysOSAS_ShowOnline s           cs,?@Atdi|}B|SdS(s"interface for adding the OSAS_roots*Products/OSA_system/AddOSAS_ShowOnline.zptN(sPageTemplateFiles__of__sselfspt(sselfspt((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pysmanage_AddOSAS_ShowOnlineForm?scsPDEFt|}G|i||H|tj oI|idndS(sadd the OSAS_roots manage_mainN(sOSAS_ShowOnlinesidsnewObjsselfs _setObjectsRESPONSEsNonesredirect(sselfsidsRESPONSEsnewObj((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pysmanage_AddOSAS_ShowOnlineDs sOSAS_StoreOnlinecs;LtZdZMNeZPdZTdZVeiddWdZ\dZ fdZ qdd Z wd Z |d Z d Zd ZdZdZdZdZdZdZdZdZdZdZdZdZRS(s!Webfrontend fr das StoragesystemcsPQR||_dS(sinitialize a new instanceN(sidsself(sselfsid((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pys__init__PssOSAS_StoreOnlinesViews index_htmlcs,WXYtdi|}Z|SdS(s main views'Products/OSA_system/OSAS_StoreFiles.zptN(sPageTemplateFiles__of__sselfspt(sselfspt((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pys index_htmlWscs<\]^tii|do`t|SndgSdS(sZeige Contextes /index.metaN(sosspathsexistss readContexts(sselfspath((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pys readContexts\scspfgitidtidd|idk|id|iid<mtdi|}n|SdS(s!rescale thumbs of imeages in pathsssh nausikaa2.rz-berlin.mpg.de /usr/local/mpiwg/scripts/scaleomat.pl %s /mpiwg/temp/online/scaled/thumb 90 --replace >> /tmp/sc.out &s/mpiwg/online/sspaths#Products/OSA_system/OSAS_scaled.zptN( sosspopensressubsselfsREQUESTsSESSIONsPageTemplateFiles__of__spt(sselfspathspt((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pys rescaleThumbsfs *ics#qrtt|d}u|SdS(sload filesystemiN(s filesystem2sstartsk(sselfsstartsreloadsk((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pysgetfilesystem2qscs wxyt|}z|SdS(sget the filetreeN(sbrowsesstartsk(sselfsstartsk((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pystreewscs!|}~t|id|SdS(s&generates navigation bar for viewfilessURLN(spath_to_link_storesselfsREQUESTspath(sselfspath((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pyspath_to_link_store|scst|SdS(scheck if digilibN(s isdigilib2spath(sselfspath((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pys isdigilib2scst|SdS(N(s changeNamesname(sselfsname((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pys changeNamescst|SdS(N(s hasMetafilespath(sselfspath((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pys hasMetafilescst|SdS(N(s getMetafilespath(sselfspath((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pys getMetafilescsK|i|i|||iii|idd|SdS(s%Oeffnen bzw. schlieen der SubfolderssURL1s?path=N(sselfstreespathstogglesfilesREQUESTsRESPONSEsredirect(sselfspathsfile((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pys toggle_viewscst||SdS(sTest ob Eintrag ein Folder istN(sisFoldersselfspath(sselfspath((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pysisFolderscst||SdS(sTest ob Eintrag ein Folder istN(sisScannedDocumentsselfspath(sselfspath((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pysisScannedDocumentscst||SdS(sTest ob Eintrag ein Folder istN(s isFullTextspaths folder_name(sselfspaths folder_name((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pys isFullTextscs,tdi|}|SdS(sadd a new paths&Products/OSA_system/OSAS_addFolder.zptN(sPageTemplateFiles__of__sselfspt(sselfspathspt((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pys addFolderFormscstdtSdS(Ns%d.%m.%Y(sstrftimes localtime(sself((sG/usr/local/mpiwg/Zope_devel/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((sG/usr/local/mpiwg/Zope_devel/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((sG/usr/local/mpiwg/Zope_devel/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((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pys EditIndex2s cs,tdi|}|SdS(snothings(Products/OSA_system/OSAS_addmetadata.zptN(sPageTemplateFiles__of__sselfspt(sselfspt((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pys add_metafiles(s__name__s __module__s__doc__sClassSecurityInfossecuritys__init__s meta_typesdeclareProtecteds index_htmls readContextss rescaleThumbssgetfilesystem2streespath_to_link_stores isdigilib2s changeNames hasMetafiles getMetafiles toggle_viewsisFoldersisScannedDocuments isFullTexts addFolderFormsdates addFolders EditIndexs EditIndex2s add_metafile(((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pysOSAS_StoreOnlineLs2                   cs,tdi|}|SdS(s"interface for adding the OSAS_roots+Products/OSA_system/AddOSAS_StoreOnline.zptN(sPageTemplateFiles__of__sselfspt(sselfspt((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pysmanage_AddOSAS_StoreOnlineFormscsPt|}|i|||tj o|idndS(sadd the OSAS_roots manage_mainN(sOSAS_StoreOnlinesidsnewObjsselfs _setObjectsRESPONSEsNonesredirect(sselfsidsRESPONSEsnewObj((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pysmanage_AddOSAS_StoreOnlines cstiii|d}|id}g}x||D]q}yXt |iddi }t |iddi }|i ||fWn nXqGW|SdS(sReadContext from index.metas /index.metascontextslinkisnameN(sxmlsdomsminidomsparsespathsgetElementsByTagNamesnodessretsnodesgetTexts childNodesslinksnamesappend(spathsnodeslinksdomsnodessretsname((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pys readContextss   (s*(s RoleManager(sImplicit(s Persistent(sstrptime(sstrftimes/var/tmp/archivers .HSResources lost+foundsNetwork Trash FoldersTheFindByContentFoldersTheVolumeSettingsFoldersfsentrycstZdZdZdZ dZ dZ dZ eZ dZ e i ddZ e i ddZ !e i d"dZ&e i d'd Z+e i d ,d Z/e i d 0d ZRS(sFile entry classscsptiitid|id}||_||_d|_ tii ||_ dS(sinitialize classs(.*)\nisN( sosspathsabspathsressearchsextpathsgroupsselfsallsusersgetmtimesmtime(sselfsextpath((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pys__init__s *   sgetPathcs|iSdS(sAusgabe von pathN(sselfspath(sself((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pysgetPathssgetUsercs|iSdS(sAusgabe von userN(sselfsuser(sself((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pysgetUserssgetDatecs&"#$tdti|iSdS(sAusgabe von Dates %Y%m%d%H%MN(sstrftimestimesgmtimesselfsmtime(sself((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pysgetDate"scs!'()|i|iSdS(s)Ausgabe einer eindeutigen Sortierbaren IDN(sselfsgetDatesgetPath(sself((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pysgetID'ssgetTimecs,-.|iSdS(sAusgabe von pathN(sselfstime(sself((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pysgetTime,ssgetAllcs012|iSdS(sAusgabe von pathN(sselfsall(sself((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pysgetAll0s(s__name__s __module__s__doc__spathsusersmonthsdatestimesClassSecurityInfossecuritys__init__s declarePublicsgetPathsgetUsersgetDatesgetIDsgetTimesgetAll(((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pysfsentrys(            s filesystemcsm4tZdZ56hZ7hZ8eZ:dZAdZRddZ Yei dZdZ ]ei d^dZ aei d bd Z fei d gd Zld ZzdZei ddZei ddZei ddZei ddZei ddZRS(sstore filesystemcs=:;<tid|dd}=|i}?|SdS(sload filessystemsfind s -name '*' srN(sosspopensstartsfs readlinesslines(sselfsstartslinessf((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pysgetfs:scsABCx|i|DC]}Etid|}F|tj oG|id}H|id}I|i i |o4J|i |}K|i|L||i |h|_?|iti||i||d||dd||dd}|d}qW|SdS( s&generates navigation bar for showfilessiiiss/N( sstringsosspathsdirnamestmppathsisbasenamespathesslensappend(spathstmppathspathessstringsi((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pys path_to_links"   "-cs1d}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((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pyspath_to_link_views"   "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((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pyspath_to_link_stores"   "5sErrorcsHtZgZeZdZeiddZRS(Ncs|d|_dS(Ni(s initerrorsselfserror(sselfs initerror((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pys__init__ssgetErrorcs|iSdS(N(sselfserror(sself((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pysgetErrors(s__name__s __module__serrorsClassSecurityInfossecuritys__init__s declarePublicsgetError(((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pysErrors    s metacheckcsTtZgZeZdZdZeid dZRS(Ncsd}t|dj ox"|D]}||d}q0Wtid|}|iddjo d}n0|iddjo d }n d }||gSndd gSd S( sparse for errorsis
s (.*):(.*)isABORTserrorsDONEsoksrunningN( sretstrslensstrslinesressearchschecksgroupserror(sselfsstrserrorslinesretstrscheck((sG/usr/local/mpiwg/Zope_devel/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((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pys__init__s 2 smessagescs  |iSdS(N(sselfslines(sself((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pysmessages s( s__name__s __module__slinessClassSecurityInfossecuritys parsearchives__init__s declarePublicsmessages(((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pys metachecks     sarchivecsTtZgZeZdZ&dZ5eid6dZRS(Ncsd}t|dj ox"|D]}||d}q0Wtid|}|iddjo d}n0|iddjo d }n  d }"||gSn$dd gSd S( sparse for errorsis
s (.*):(.*)isABORTserrorsDONEsoksrunningN( sretstrslensstrslinesressearchschecksgroupserror(sselfsstrserrorslinesretstrscheck((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pys parsearchives     cs&'(g|_)h|_*||d<-t|tjoF.ti|i|</t i d|d|i|dd}nZ1xS|D1]H}2ti|i|<3t 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((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pys__init__&s   0 smessagescs{67g|_8xX|iiD8]D}:|iit||it|i|di gq"W;|iSdS(Nsr( sselfsliness filenamesskeysspathsappendsErrors parsearchivesopens readlines(sselfspath((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pysmessages6s   B( s__name__s __module__slinessClassSecurityInfossecuritys parsearchives__init__s declarePublicsmessages(((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pysarchives     cs>?t|SdS(N(sevalsstr(sstr((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pysevalext>scsCAB|ii}C||d|<D||d|<Fd|SdS(Nserror%ispath%iserror?number=%i(scontextsREQUESTsSESSIONssessionsretsispath(sretspathscontextsissession((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pys storeerrorAscs!HI|ii}J||SdS(N(scontextsREQUESTsSESSIONssessionsstr(sstrscontextssession((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pysgeterrorHscsSLNd}Ot|d}Px$|iDP]}Q||}q.WR|SdS(Nssr(sretsopenspathsfs readlinessg(spathsgsretsf((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pysreadfileLs   csRTUt|d}V|i|W|iX|id}Y|SdS(Nswsarchive2( sopenspathsfswritestxtsclosesselfs aq_acquiresrval(sselfspathstxtsREQUESTsrvalsf((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pys writefileTs  cs1\]^|id|iid<_t|SdS(s(check the metadata the documents in pathspathN(sselfsREQUESTsSESSIONs metacheckspath(sselfspath((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pys metachecker\scs8abct||ii}d|iiidSdS(sarchive the documents in pathsarchive4N(sarchivespathsselfsREQUESTsSESSIONstmpsRESPONSEsredirect(sselfspathstmp((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pysarchiverascsXfhd}ix;|Di]0}j|i|ijok||i}nqWl|SdS(Ns(srcsnodelistsnodesnodeTypes TEXT_NODEsdata(snodelistsnodesrc((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pysgetTextfs   cs~nod}qx]|Dq]R}s|i|ijo6tu|dt|idt|id}nqWw|dSdS(Nsss
s : s
( srcsnodelistsnodesnodeTypes ELEMENT_NODEsstrsnodeNamesgetTexts childNodes(snodelistsnodesrc((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pysgetBibns  7c syz{g}|tii|d o ~dSntid|dd}|i}ti i i |}y#t |i ddi}Wnd}nXy#t |i ddi}Wnd}nXy#t |i d di}Wnd}nXy#t |i d di} Wnd} nXy#t |i d di}Wnd }nX|d jod|d}n7|djod|d}nd|d}|d|d|d}|d| d}y|i ddi dd} | iido#|d| idid}n|d}|t| i}Wn nX|SdS(sget index.metas /index.metas NO_METADATAscat srsnameisNOT_DEFINED!!!screatorsarchive-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((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pys getMetafileysV  # # # # # ## cs!tii|dSdS(sget index.metas /index.metaN(sosspathsexists(spath((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pys hasMetafilesc sygti|}ddddddddd g }d }xE|D]:}tii|}|d |jo d SnqUWyt 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((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pys isdigilib2s,$  , &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((sG/usr/local/mpiwg/Zope_devel/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((sG/usr/local/mpiwg/Zope_devel/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((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pys changeNames$csP  d|_ |ididd|ididddSdS(NisOFSPsneusHELLOsok(sselfsismanage_addProductsmanage_addDTMLMethodsgetattrs manage_edit(sself((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pystest s slscstZdZdZdZdZdZdZeZ dZ "e i d#dZ %e i d&dZ (e i d)dZ/e i d 0d ZRS( sFile entry classscsDti|_||d<tid|idddS(Nsoutfiles ls -R / >s &sr(stempfilesmktempsselfsoutfilesstartsosspopen(sselfsstart((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pys__init__s sreadcs#$|iiSdS(N(sselfsfsread(sself((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pysread#ssretselfcs&'|SdS(N(sself(sself((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pysretself&ssallcs>)*d}+x!|iD+]},||}qW-|SdS(Ns(sretsselfsfsg(sselfsgsret((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pysall)s   s printOutfilecsE01x"1tii|i o2q W3t|iiSdS(N(sosspathsexistssselfsoutfilesopens readlines(sself((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pys printOutfile0s(s__name__s __module__s__doc__spathsusersmonthsdatestimesClassSecurityInfossecuritys__init__s declarePublicsreadsretselfsalls printOutfile(((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pyslss           soverviewcs5tZ6gZ7hZ8eZ:dZAdZKdZ^ei d_dZ gei dhdZ RS(NcsT:;ti|}=x5|D=]*}>|d||i|i||s (.*):(.*)isABORTserrorsDONEsoksrunningN( sretstrslensstrslinesressearchschecksgroupserror(sselfsstrserrorslinesretstrscheck((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pys parsearchiveKs     smessagescs_`g|_axa|iiDa]M}b|i|}d|iit||it |di gq"We|iSdS(Nsr( sselfsliness resourcesskeyssnamespathsappendsErrors parsearchivesopens readlines(sselfspathsname((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pysmessages_s   ;s printResourcecshi|iSdS(N(sselfs resources(sself((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pys printResourcehs( s__name__s __module__sdirs resourcessClassSecurityInfossecuritys__init__s getResources parsearchives declarePublicsmessagess printResource(((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pysoverview5s       cskmt|SdS(N(soverviewspath(spath((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pys getoverviewkscs2pqt|ii}r|iiidSdS(Nsnext(slssselfsREQUESTsSESSIONstmpsRESPONSEsredirect(sselfstmp((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pysls_testpscs!tu||iid<vdSdS(Ns somethingi(s somethingsselfsREQUESTsSESSION(sselfs something((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pys storeFiletscsxy|iidSdS(Ns something(sselfsREQUESTsSESSION(sself((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pysgetFilexscs{|}t|| SdS(shreturns TRUE, wenn path ein Folder ist in den weitere Objekte Folder oder Dokumente gelegt werden drfenN(sisScannedDocumentsselfspath(sselfspath((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pysisFolder{scsyt|dd}|i}yjtiii|}t |i ddi }|djp |djo dSndSWndSnXWndSnXdS( sFreturns TRUE, wenn path der Stammordner eines gescannten Documents ists /index.metasrs content-typeisscanned-documentsscanned documentiN( sfilespathsfsreadslinessxmlsdomsminidoms parseStringsgetTextsgetElementsByTagNames childNodess content_type(sselfspaths content_typesdomsfslines((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pysisScannedDocuments  (s localtimesstrftimecstdtSdS(Ns%d.%m.%Y(sstrftimes localtime(sself((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pysdates(Rs addFolders OFS.FoldersFoldersOFS.SimpleItems SimpleItems'Products.PageTemplates.PageTemplateFilesPageTemplateFiles#Products.PageTemplates.PageTemplates PageTemplates AccessControlsClassSecurityInfosGlobalssInitializeClasssOSAS_ShowOnlinesmanage_AddOSAS_ShowOnlineFormsNonesmanage_AddOSAS_ShowOnlinesOSAS_StoreOnlinesmanage_AddOSAS_StoreOnlineFormsmanage_AddOSAS_StoreOnlines readContextsstypessurllibsosssyssresAccessControl.Roles RoleManagers AcquisitionsImplicits 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(Es 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 PersistentsInitializeClassssyss SimpleItems writefilesgeterrors filesystem2sErrorsdatesres isFullTexts getMetafilesls_tests localtimesmanage_AddOSAS_ShowOnlineFormsgetBibsfsentrysdircachespath_to_link_stores changeNamesisPresentations filesystems readContextssgetFilesentriess metacheckersossstrftime((sG/usr/local/mpiwg/Zope_devel/lib/python/Products/OSA_system/OSAS_show.pys?s1                /V8        (.         9  "   #6