mò ,á¸Ec@s\dZdkZdkZdkZdklZdklZdk Z dkZdk Z dk Z dk Z dkZdklZdklZlZdklZdklZdklZd klZd klZdkZee d ƒ o fe _nee d ƒ ohe _ he _!ngZ"ed ƒZ#d fd„ƒYZ$dfd„ƒYZ%dS(svObjects providing context for product initialization $Id: ProductContext.py 41197 2006-01-08 10:47:25Z andreasjung $ N(s getLogger(sPermissionRole(s doInstall(s HelpTopics APIHelpTopic(s ProductHelp(sFactoryDispatcher(sDateTime(sinstancesOfObjectImplements(s implementedByt meta_typest meta_classestProductContextc BsŒtZd„Zdddfddfdedd„ Zdd„Zdd„Zd„Zd„Z d „Z d d e i d e i ƒd „ZRS(NcCs||_||_||_dS(N(tproducttselft_ProductContext__prodtappt_ProductContext__apptpackaget_ProductContext__pack(RRRR((t1/data/zmath/zope/lib/python/App/ProductContext.pyt__init__/s  ttGlobalc CsÀ|i}|d}|i}|i} |o;|dj o.t |dd| t ii|ƒdfƒn|ot|tƒotd|f‚nxg|D][}t|tƒo,|\}}tii|f|ffƒq˜tii|fffƒq˜Wn|djod|p|i}nt|tƒo|\}}nd}t||ƒ} tii|f|ffƒtii}x³|D]«}t|tƒo|\}}d} n|i%}d} |i&i'|ƒp]t |||ƒt ||d| ƒ| o.t ||i%|ƒt ||i%d| ƒq/q„q„Wt|tƒo|\}}n |i%}t(|d dƒ}|djo'd t*fd „ƒY}|}|_+nt,|d ƒpt-|ƒ|_.n|i.}| t1joC|djo f} qtt2|ƒƒ} | tt3|ƒƒ7} nt4i5hd |p|i<d d| |f<d| <d|<d|<d| <d|<d|  Sets the title of the Product's Product Help ttitleN(RR[thR>R$R_(RR_R`((R tregisterHelpTitles thelpis(.+?)cCstƒpdSn|iƒ}tiiti|i i ƒ|ƒ} y t ti | ƒt iƒ}Wn6tj o*\} }tid|| fƒdSnX|idj o|i|jodSnt ƒ|_|o1x.|iddgƒD]}|i|ƒqìWnxti| ƒD]p}tii|ƒd}|iƒ}|djo‹t tii| |ƒdƒi!ƒ}|i$|ƒ} | o| i&dƒ} nd} t(i)|dtii| |ƒƒ} |i+|| ƒq|djo‹t tii| |ƒdƒi!ƒ}|i$|ƒ} | o| i&dƒ} nd} t(i,|| tii| |ƒƒ} |i+|| ƒq|djoit tii| |ƒdƒi-ƒi.d ƒd} t(i/|| tii| |ƒƒ} |i+|| ƒq|djo8t(i0|dtii| |ƒƒ} |i+|| ƒq|djoP|ddjoqnt1i1|dtii| |ƒƒ} |i+|| ƒqqWdS(s) Registers Help Topics for all objects in a directory. Nothing will be done if the files in the directory haven't changed since the last registerHelp call. 'clear' indicates whether or not to delete all existing Topics from the Product. HelpTopics are created for these kind of files .dtml -- DTMLHelpTopic .html .htm -- TextHelpTopic .stx .txt -- STXHelpTopic .jpg .png .gif -- ImageHelpTopic .py -- APIHelpTopic Ns%s: %ss Help Topics Help Imageis.dtmltrbR s.htmls.htms.stxs.txtt:is.jpgs.gifs.pngs.pyt_(s.dtml(s.htmls.htm(s.stxs.txt(s.jpgs.gifs.png(s.py(2t doInstallRR[RbR&R'tjoinRHt package_homeR R<t directorytDateTimetstattST_MTIMEt dir_mod_timetOSErrorterrnottexttLOGtwarntlastRegisteredR$tcleart objectIdsR!t _delObjecttlistdirtfiletsplitexttexttlowertopentreadtcontentsttitle_retsearchRCtgroupR_t HelpTopict DTMLTopicthtR^t TextTopictreadlineR(tSTXTopict ImageTopict APIHelpTopic(RRiRtRRbRpRxR!R~R_RoRCR„R'RmRz((R t registerHelpsd         $$ $$ 1$ $ $(RRR R$RDRLRURXR[R^RatretcompiletIRŠ(((R R-s '²    RBcBstZd„Zd„ZRS(NcCs ||_dS(N(tobR(RRŽ((R R nscCst|i||ƒdS(N(R%RRŽRtv(RRR((R t __setitem__qs(RRR R(((R RBls (&RRktos.pathR&R‹tloggingt getLoggertAccessControl.PermissionRoleR4RHtOFS.ObjectManagerR6t OFS.misc_RGtAccessControl.PermissionR0t App.ProductRftHelpSysR‚R‰tHelpSys.HelpSyst ProductHelpR@RjtInterface.ImplementsRFtzope.interfaceRERVRARRRTRDRqRRB(RqRRDRFRER‹R@RkR‚R6RGRjR0RVRfR›R“RHR‰RBR&R4((R t?s0   -            ÿ@