MacroBazaar: Debbug.py
| File Debbug.py, 378 bytes (added by piman, 7 years ago) |
|---|
| Line | |
|---|---|
| 1 | # Debian BTS macro for Trac |
| 2 | # Usage: [[Debbug(nnnnn)]] |
| 3 | # [[Debbug(package)]] |
| 4 | # [[Debug]] |
| 5 | |
| 6 | def execute(hdf, txt, env): |
| 7 | args = txt or "" |
| 8 | if args.isdigit(): text = "Debian bug #%s" % args |
| 9 | elif args: text = "Debian bugs for %s" % args |
| 10 | else: text = "Debian Bug Tracking System" |
| 11 | return """<a href="http://bugs.debian.org/%s">%s</a>""" % (args, text) |
