Changeset 3079
- Timestamp:
- 01/17/08 13:23:54 (10 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
componentsprocessormacro/0.11/ComponentsListMacro.py
r2810 r3079 1 1 # -*- coding: utf-8 -*- 2 """Adds a wiki macro [[Components ]] which lists and describes the project's components, and links to wiki pages describing the components in more detail, and any tickets for thecomponents.2 """Adds a wiki macro [[Components(pattern)]] which lists and describes the project's components, and links to wiki pages describing the components in more detail, and any tickets for the components. The optional pattern parameter is a regex that can be used to filter components. 3 3 4 4 terry_n_brown@yahoo.com … … 7 7 import inspect 8 8 import sys 9 import re 9 10 10 11 from trac.core import Component, implements … … 23 24 return inspect.getdoc(sys.modules.get(self.__module__)) 24 25 25 def expand_macro(self, formatter, name, content):26 def expand_macro(self, formatter, name, pattern): 26 27 27 28 cursor = self.env.get_db_cnx().cursor() … … 40 41 41 42 for name, descrip in comps: 43 if pattern and not re.match(pattern, name): continue 42 44 dt = ' [wiki:%s]' % name 43 45 if name in tickets:
