Changes between Version 1 and Version 2 of CreatePluginScript
- Timestamp:
- Jul 3, 2008, 8:47:33 PM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
CreatePluginScript
v1 v2 3 3 == Description == 4 4 5 This python package will create a plugin skeleton given its name and a list of interfaces. The console script, create-trac-plugin, front-ends TracPluginTemplateScript and creates the basic layout of the plugin using [http://pythonpaste.org/script/ PasteScript]. Then the basic contents of the [http://trac.edgewall.org/wiki/TracDev/ComponentArchitecture component] are generated by looking through the chosen interfaces and filling out the imports needed and signatures for the methods used.5 This python package will create a trac plugin skeleton given its name and a list of interfaces it is to implement. The console script, {{{create-trac-plugin}}}, front-ends TracPluginTemplateScript and creates the basic layout of the plugin using [http://pythonpaste.org/script/ PasteScript]. Then the basic contents of the [http://trac.edgewall.org/wiki/TracDev/ComponentArchitecture component] are generated by looking through the chosen interfaces and filling out the imports needed and signatures for the methods used. 6 6 7 The create-component script front-ends create_component.py, which can be used as as standalone piece without the rest of the software.7 The {{{create-trac-component}}} console script front-ends [source:createpluginscript/anyrelease/create_trac_plugin/create_component.py create_component.py], which can be used as as standalone piece without the rest of the package. 8 8 9 9 == Bugs/Feature Requests == … … 19 19 Download the zipped source from [download:createpluginscript here]. 20 20 21 If you just want {{{create_component.py}}} go [http://trac-hacks.org/svn/createpluginscript/anyrelease/create_trac_plugin/create_component.py here]. 22 21 23 == Source == 22 24 23 You can check out CreatePluginScript from [http://trac-hacks.org/svn/createpluginscript here] using Subversion, or [source:createpluginscriptbrowse the source] with Trac.25 You can check out CreatePluginScript from [http://trac-hacks.org/svn/createpluginscript/anyrelease here] using Subversion, or [source:createpluginscript/anyrelease browse the source] with Trac. 24 26 25 27 == Example == … … 80 82 {{{ 81 83 NewPlugin/ 82 |-- NewPlugin.egg-info 84 |-- NewPlugin.egg-info # generated by PasteScript 83 85 |-- newplugin 84 86 | |-- __init__.py … … 90 92 91 93 {{{ 92 """ 94 """ 93 95 NewPlugin: 94 96 a plugin for Trac 95 97 http://trac.edgewall.org 96 """ 98 """ 97 99 98 100 from trac.core import * … … 107 109 ### methods for ITemplateStreamFilter 108 110 109 """Filter a Genshi event stream prior to rendering."""111 """Filter a Genshi event stream prior to rendering.""" 110 112 111 113 def filter_stream(self, req, method, filename, stream, data): 112 """Return a filtered Genshi event stream, or the original unfiltered114 """Return a filtered Genshi event stream, or the original unfiltered 113 115 stream if no match. 114 116 … … 119 121 120 122 See the Genshi documentation for more information. 121 """123 """ 122 124 123 125 ### methods for IWikiSyntaxProvider 124 126 125 127 def get_link_resolvers(self): 126 """Return an iterable over (namespace, formatter) tuples.128 """Return an iterable over (namespace, formatter) tuples. 127 129 128 130 Each formatter should be a function of the form … … 130 132 return some HTML fragment. 131 133 The `label` is already HTML escaped, whereas the `target` is not. 132 """134 """ 133 135 134 136 def get_wiki_syntax(self): 135 """Return an iterable that provides additional wiki syntax.137 """Return an iterable that provides additional wiki syntax. 136 138 137 139 Additional wiki syntax correspond to a pair of (regexp, cb), … … 139 141 which will be called if there's a match. 140 142 That function is of the form cb(formatter, ns, match). 141 """143 """ 142 144 }}} 143 145 … … 154 156 == Author/Contributors == 155 157 158 ''Originally developed at [http://topp.openplans.org The Open Planning Project]'' 159 156 160 '''Author:''' [wiki:k0s] [[BR]] 157 161 '''Contributors:'''