;ς )δHEc @ sW d Z d k Z d k Z d k Z d k l Z l Z d Z e i e i Z d Z d S( s$ Replace pamphlet contents with embedded PDF $Id: ReplacePamphlet.py,v 0.2 2005/11/12 Bill Page $ TODO: 1) Provide a wiki folder property to override the path so that pamphlet, dvi, and pdf files can be mapped to specific directories. Currently defaults to 'imagesPath' for Zope/LatexWiki compatibility. But Apache proxy or additional Zope external files systems would allow them to be anywhere. 2) Write pamphlet file to source code archive and do a check-in Archive check-in controlled/disabled by a wiki folder property. N( s imagesPaths workingDirs
%sc C s d k l } t i d | t } | oγd i | i i d d } t i i t | } y t i | Wn n X| i } t i i | | } y7 t | d d } | i | i d | i Wn d GH n Xt i d | i d t } | o | i d } n d } | | | | } t i i d t | | } d | | | | | | | i d d i g i } t i! d | i d D]7 } | i d d j o | d | i d qq~ | f | o d | p d | i d f Sn d | f Sd S( N( s renderPDFs ^(\\.*?\\end{document})(.*)$s /i s .pamphlets wi s Can't save pamphlet files0 .*\\usepackage\[.*(dvips|dvipdfm).*?\]{hyperref}s s1
| Download: pdf dvi ps src tex log |

%si (# s pamphletWrappers renderPDFs res matchs bodys reConstss docs joins pages wiki_base_urls splits fPaths oss paths workingDirs fDirs makedirss title_or_ids pageNames fNames opens files writes groups closes pdfs pdfMethods errorss imagesPaths fUrls page_urls appends _[1]s finditers m( s pages bodys files docs ms fPaths fUrls _[1]s renderPDFs fNames fDirs pageNames pdfs errorss pdfMethod( ( sR /mnt/gmirror/ports/www/zope-zwiki/work/ZWiki/plugins/mathaction/ReplacePamphlet.pys replacePamphlet s4 "Ό( s __doc__s res oss strings utils imagesPaths workingDirs errorMessages MULTILINEs DOTALLs reConstss replacePamphlet( s reConstss strings errorMessages workingDirs res imagesPaths oss replacePamphlet( ( sR /mnt/gmirror/ports/www/zope-zwiki/work/ZWiki/plugins/mathaction/ReplacePamphlet.pys ? s