[Trac] description diff without rebuilding the exe

2014-05-01 Thread David Vanleeuwen
I am running trac 0.12 on a server (our company actually has several trac 
systems using different versions) and I want to be able to diff the 
description in email notifications instead of Old and then New 
descriptions.  I have seen some solutions for this by changing the 
notification.py and rebuilding the exe.  Does anyone know of a way to do 
this without changing the source code and then rebuilding the exe?

I was thinking that I could possibly do some python in the 
ticket_notify_email.txt to pull apart $changes_descr into old description 
and then new discription and then run a diff.  Is there a better way to do 
this? Also, is there a way to run a python script in genshi?

Thanks,
David

-- 
You received this message because you are subscribed to the Google Groups Trac 
Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at http://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] description diff without rebuilding the exe

2014-05-01 Thread Steffen Hoffmann
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 01.05.2014 17:10, David Vanleeuwen wrote:
 Also, is there a way to run a python script in genshi?

I do know at least of two:

Python code block/lines (as permitted by Genshi xmlns as I guess)

!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN
  http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;
html xmlns=http://www.w3.org/1999/xhtml;
  xmlns:xi=http://www.w3.org/2001/XInclude;
  xmlns:py=http://genshi.edgewall.org/;
  !--!
Copyright (C) 2007-2011 Radek BartoĊˆ black...@post.cz

This software is licensed as described in the file COPYING, which
you should have received as part of this distribution.
  --
  xi:include href=discussion-macros.html/
  xi:include href=layout.html/
  head
titleForum List ndash; Discussion/title
  /head
  ?python
from trac.wiki.formatter import format_to_oneliner
from trac.util.datefmt import format_datetime, pretty_timedelta
from tracdiscussion.api import format_to_oneliner_no_links
  ?

Python code snippet inside ${} (another Genshi XHTML template extension)

  py:def function=display_group(group, forums)
table class=listing
  thead
tr py:if=group and group.id != 0
  th class=group colspan=11
div class=name${format_to_oneliner(discussion.env,
context, group.name)}/div
div
class=description${format_to_oneliner(discussion.env, context,
group.description)}/div
  /th
/tr

Beware, that cited examples are not showing ideal code by no means, just
meant for illustration of the real-world use case.

Steffen Hoffmann
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Icedove - http://www.enigmail.net/

iEYEARECAAYFAlNi7Z8ACgkQ31DJeiZFuHdomwCfTq79KKM2ksOxHox0NT1gEReI
m4oAn0aBussl6zBtFrke0vV3nfEfCymZ
=s7V7
-END PGP SIGNATURE-

-- 
You received this message because you are subscribed to the Google Groups Trac 
Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at http://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.