Changes between Version 1 and Version 2 of WikiMacros
- Timestamp:
- Jan 16, 2015, 11:29:31 AM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WikiMacros
v1 v2 77 77 For more information about developing macros, see the [trac:TracDev development resources] on the main project site. 78 78 79 80 Here are 2 simple examples showing how to create a Macro with Trac 0.11. 81 82 Also, have a look at [trac:source:tags/trac-0.11/sample-plugins/Timestamp.py Timestamp.py] for an example that shows the difference between old style and new style macros and at the [trac:source:tags/trac-0.11/wiki-macros/README macros/README] which provides a little more insight about the transition. 79 Here are 2 simple examples showing how to create a Macro. Also, have a look at [trac:source:tags/trac-1.0.2/sample-plugins/Timestamp.py Timestamp.py] for an example that shows the difference between old style and new style macros and at the [trac:source:tags/trac-0.11/wiki-macros/README macros/README] which provides a little more insight about the transition. 83 80 84 81 === Macro without arguments === … … 102 99 def expand_macro(self, formatter, name, text): 103 100 t = datetime.now(utc) 104 return tag. b(format_datetime(t, '%c'))101 return tag.strong(format_datetime(t, '%c')) 105 102 }}} 106 103