Update of /cvsroot/mahogany/M/doc
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31358/doc

Modified Files:
        Manual.htex 
Log Message:
implemented support for Python functions in message templates

Index: Manual.htex
===================================================================
RCS file: /cvsroot/mahogany/M/doc/Manual.htex,v
retrieving revision 1.110
retrieving revision 1.111
diff -b -u -2 -r1.110 -r1.111
--- Manual.htex 18 Sep 2004 19:02:35 -0000      1.110
+++ Manual.htex 18 Sep 2004 19:32:30 -0000      1.111
@@ -1975,5 +1975,21 @@
 
 Very similar to the previous category, this one allows to execute arbitrary
-Python scripts. Currently this is not implemented.
+Python scripts. The syntax is \texttt{"python:\texttt{function}"} and you may
+additional string arguments which will be passed to the function.
+
+Possibility to use Python functions allows to do almost anything in the message
+expansion. For example, to use different signatures in replies to different
+people all you have to do is to append \texttt{"\$\{python:sig?\$to\}"} at the
+end of your reply template and add a Python function like this to your
+\texttt{Minit.py} file:
+\begin{verbatim}
+   def sig(to):
+      if to = "[EMAIL PROTECTED]":
+         return "Hello someone!"
+      elif to = "[EMAIL PROTECTED]":
+         return "Goodbye someone else"
+      else # general case
+         return "No special signature for you, sorry"
+\end{verbatim}
 
 



-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to