PKLQ4linediff/__init__.pyPKkU4Z3linediff/macro.pyfrom trac.core import * from trac.wiki.api import IWikiMacroProvider from trac.mimeview.patch import PatchRenderer import inspect, difflib, time class LineDiffMacro(Component): """Diff (and render) two lines of text.""" implements(IWikiMacroProvider) def get_macros(self): """Yield the name of the macro based on the class name.""" name = self.__class__.__name__ if name.endswith('Macro'): name = name[:-5] yield name def get_macro_description(self, name): """Return the subclass's docstring.""" return inspect.getdoc(self.__class__) def render_macro(self, req, name, content): lines = content.splitlines(1) pr = PatchRenderer(self.env) udiff = "".join(difflib.unified_diff([lines[0]],[lines[1]], 'Line_1', 'Line_2', time.ctime(), time.ctime())) if not udiff: return "" self.log.debug("'%s'"%udiff) return pr.render(req, None, udiff) PKsU4^linediff/__init__.pyc; PߣDc@sdS(N((((s/build/bdist.linux-i686/egg/linediff/__init__.pys?sPKsU4x))linediff/macro.pyc; Dc@sVdkTdklZdklZdkZdkZdkZdefdYZ dS((s*(sIWikiMacroProvider(s PatchRendererNs LineDiffMacrocBs3tZdZeedZdZdZRS(s$Diff (and render) two lines of text.ccs2|ii}|ido|d }n|VdS(s4Yield the name of the macro based on the class name.sMacroiN(sselfs __class__s__name__snamesendswith(sselfsname((s,build/bdist.linux-i686/egg/linediff/macro.pys get_macros s  cCsti|iSdS(s Return the subclass's docstring.N(sinspectsgetdocsselfs __class__(sselfsname((s,build/bdist.linux-i686/egg/linediff/macro.pysget_macro_descriptionscCs|id}t|i}diti |dg|dgddt i t i }| odSn|i id||i|t|SdS(NisisLine_1sLine_2s'%s'(scontents splitlinessliness PatchRenderersselfsenvsprsjoinsdifflibs unified_diffstimesctimesudiffslogsdebugsrendersreqsNone(sselfsreqsnamescontentsprsudiffslines((s,build/bdist.linux-i686/egg/linediff/macro.pys render_macrosA(s__name__s __module__s__doc__s implementssIWikiMacroProviders get_macrossget_macro_descriptions render_macro(((s,build/bdist.linux-i686/egg/linediff/macro.pys LineDiffMacros    ( s trac.cores trac.wiki.apisIWikiMacroProviderstrac.mimeview.patchs PatchRenderersinspectsdifflibstimes Components LineDiffMacro(sIWikiMacroProviders PatchRenderersinspectsdifflibs LineDiffMacrostime((s,build/bdist.linux-i686/egg/linediff/macro.pys?s  PKrU4FcKffEGG-INFO/PKG-INFOMetadata-Version: 1.0 Name: TracLineDiffMacro Version: 0.1-r1 Summary: A small macro to diff two lines of text. Home-page: http://trac-hacks.org/wiki/ Author: Noah Kantrowitz Author-email: coderanger@yahoo.com License: BSD Description: A small macro to diff two lines of text, and render the output nicely. Keywords: trac plugin macro diff Platform: UNKNOWN PKsU4v2EGG-INFO/SOURCES.txtsetup.py TracLineDiffMacro.egg-info/PKG-INFO TracLineDiffMacro.egg-info/SOURCES.txt TracLineDiffMacro.egg-info/entry_points.txt TracLineDiffMacro.egg-info/top_level.txt linediff/__init__.py linediff/macro.py PKsU4lb00EGG-INFO/entry_points.txt[trac.plugins] linediff.macro = linediff.macro PKsU4v EGG-INFO/top_level.txtlinediff PKsU4EGG-INFO/zip-safePKLQ4linediff/__init__.pyPKkU4Z32linediff/macro.pyPKsU4^Jlinediff/__init__.pycPKsU4x))linediff/macro.pycPKrU4FcKffU EGG-INFO/PKG-INFOPKsU4v2EGG-INFO/SOURCES.txtPKsU4lb00EGG-INFO/entry_points.txtPKsU4v SEGG-INFO/top_level.txtPKsU4EGG-INFO/zip-safePK O