Ñò ×OyHc@sxdZddkZddklZeidƒZeidƒZeidƒZeidƒZdefd „ƒYZ dS( s° smiley.py from http://www.la-la.com As amended by Michael Foord This version is edited to work with the Voidspace Guestbook http://www.voidspace.org.uk/python/guestbook.html iÿÿÿÿN(tpaths^(.*?)=\+:(.*?)=\+:(.*)s .*(:[^:]+:).*s.*(.*s.*(|).*tlibcBskeZd d eed„Zd„Zd eed„Zdd„Zd„Zd„Z d„Z dd „Z RS( cCs5g|_|iƒ|o|i|||ƒndS(N(tsourcestcleartload(tselftsourceturltreplacetsafe((smodules/smiley.pyt__init__"s  cCs h|_dS(N(tsmilies(R((smodules/smiley.pyR(sc Cs@t|ƒ}|djo d}n*|t|ƒddjo|d}nxÝ|idƒD]Ì}|iƒ}x­|D]¥}ti|ƒ} | o‰| idƒdiƒ} | pt i| ƒoT|p|i i | ƒ o5|| idƒd| idƒdg|i | and sections are ignored, though the start and end tags should be on individual lines for clean results.s tt ii( tsplittTruetrenoRtFalsetreyesR RR R$(RttexttbuftprocessRttokensttlR&((smodules/smiley.pyt makehappyRs*  ,cCsd|d|d}|S(sHOverride this if you want to add class information etc to the image tagss s���((Rtimagetaltttag((smodules/smiley.pyR oscCsp|i|i|d|i|dƒ}|d|djo djnpd|}nd|d|dS( sJOverride this if you want to add class information etc to the insert linksiiiÿÿÿÿt:s %s s$s(R R (RRR&((smodules/smiley.pyt get_insertts(&ttextareacCsKd|d|d}x.|iiƒD]}||i|ƒd}q&W|S(sgReturns HTML to display current smiley set with clickable Javascript links to insert into form.textareasy s (R tkeysR<(RR=tpanelR((smodules/smiley.pyt get_panel{s N( t__name__t __module__R R0R RRR$R7R R<R@(((smodules/smiley.pyR!s     ( t__doc__R!RtcompileRRR/R1tobjectR(((smodules/smiley.pyt s