[Blends-commit] [SCM] website branch, master, updated. 9eca223d4da8d1a225bff43974613fbe81c6f1bd

Andreas Tille tille at debian.org
Thu Aug 1 21:38:41 UTC 2013


The following commit has been merged in the master branch:
commit 9eca223d4da8d1a225bff43974613fbe81c6f1bd
Author: Andreas Tille <tille at debian.org>
Date:   Thu Aug 1 23:12:48 2013 +0200

    Create proper mailto links for maintainer address

diff --git a/webtools/bugs_udd.py b/webtools/bugs_udd.py
index 57250e4..ba953b9 100755
--- a/webtools/bugs_udd.py
+++ b/webtools/bugs_udd.py
@@ -15,6 +15,7 @@ import re
 import time
 from datetime import datetime
 from email.Utils import formatdate
+import email.Utils
 import gettext
 
 from genshi.template import TemplateLoader
@@ -23,6 +24,7 @@ from genshi.template.eval import UndefinedError
 
 from blendsunicode   import to_unicode
 from blendstasktools import ReadConfig, RowDictionaries, CheckOrCreateOutputDir
+from blendsmarkdown  import MarkupString
 
 ###########################################################################################
 # Define several prepared statements to query UDD
@@ -203,7 +205,8 @@ def main():
                 sources['source']      = pkg['source']
                 sources['homepage']    = pkg['homepage']
                 sources['vcs_browser'] = pkg['vcs_browser']
-                sources['maintainer']  = to_unicode(pkg['maintainer'])
+                (_name, _url) = email.Utils.parseaddr(pkg['maintainer'])
+                sources['maintainer']  = MarkupString('<a href="mailto:%s">%s</a>' % (_url, to_unicode(_name)), pkg['source'], 'maintainer')
                 if pkg['status'] == 'depends':
                     sources['bugs'] = bugs[pkg['source']]['open']
                     bugs_data[task][pkg['status']+'_l'].append(pkg['source'])

-- 
Static and dynamic websites for Debian Pure Blends



More information about the Blends-commit mailing list