Changes between Version 1 and Version 2 of WikiProcessors
- Timestamp:
- 01/23/07 01:33:03 (18 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WikiProcessors
v1 v2 1 1 = Wiki Processors = 2 Processors are WikiMacros designed to provide alternative markup formats for the Trac Wiki engine. Processors can be thought of as ''macro functions to process user-edited text''.3 2 4 The wiki engine uses processors to allow using [wiki:WikiRestructuredText Restructured Text] and [wiki:WikiHtml raw HTML] in any wiki text throughout Trac. 3 Processors are WikiMacros designed to provide alternative markup formats for the [TracWiki Wiki engine]. Processors can be thought of as ''macro functions to process user-edited text''. 4 5 The Wiki engine uses processors to allow using [wiki:WikiRestructuredText Restructured Text], [wiki:WikiHtml raw HTML] and [http://www.textism.com/tools/textile/ textile] in any Wiki text throughout Trac. 6 5 7 6 8 == Using Processors == 7 To use a processor on a block of text, use a wiki blockquote, selecting a processor by name using 'hashbang notation' (#!), familiar to most UNIX users from scripts. 9 10 To use a processor on a block of text, use a Wiki code block, selecting a processor by name using ''shebang notation'' (#!), familiar to most UNIX users from scripts. 8 11 9 12 '''Example 1''' (''inserting raw HTML in a wiki text''): … … 75 78 ---- 76 79 77 78 79 80 == Available Processors == 80 81 The following processors are included in the Trac distribution: 81 82 * '''html''' -- Insert custom HTML in a wiki page. See WikiHtml. 82 83 * '''rst''' -- Trac support for Restructured Text. See WikiRestructuredText. 83 * '''textile''' -- Initial support as of aug 2, 2004. See [http://projects.edgewall.com/trac/ticket/593 ticket 593] and [http://dealmeida.net/projects/textile/ Textile].84 * '''textile''' -- Supported if [http://dealmeida.net/projects/textile/ Textile] is installed. See [http://hobix.com/textile/ a Textile reference]. 84 85 85 === Source Code Support === 86 Trac includes processors to provide inline [wiki:TracSyntaxColoring syntax highlighting] for these languages: 86 Textile link above is rotten. [http://www.textism.com/tools/textile/ this one] works, allows to test example. 87 88 === Code Highlighting Support === 89 Trac includes processors to provide inline [wiki:TracSyntaxColoring syntax highlighting] for the following languages: 87 90 * '''c''' -- C 88 91 * '''cpp''' -- C++ … … 96 99 '''Note:''' ''Trac relies on external software packages for syntax coloring. See TracSyntaxColoring for more info.'' 97 100 98 By using the mime-type as processor, it is posible to syntax-highlight the same languages that are supported when browsing source code. (The list of mime-types can be found in [source:trunk/trac/Mimeview.py Mimeview.py]). 99 100 For example, you can write: 101 101 By using the MIME type as processor, it is possible to syntax-highlight the same languages that are supported when browsing source code. For example, you can write: 102 102 {{{ 103 103 {{{ … … 107 107 }}} 108 108 109 The result will be syntax highlighted htmlcode. The same is valid for all other mime types supported.109 The result will be syntax highlighted HTML code. The same is valid for all other mime types supported. 110 110 111 111 112 For more processor macros developed and/or contributed by users, visit: 113 * [http://projects.edgewall.com/trac/wiki/ProcessorBazaar ProcessorBazaar] 114 * [http://projects.edgewall.com/trac/wiki/MacroBazaar MacroBazaar] 112 115 113 For more processor macros developed and/or contributed by users, visit the macro bazaar:114 http://projects.edgewall.com/trac/wiki/MacroBazaar115 116 116 ----117 117 == Advanced Topics: Developing Processor Macros == 118 Developing processors is no different thanWikiMacros. In fact they work the same way, only the usage syntax differs. See WikiMacros for more information.118 Developing processors is no different from WikiMacros. In fact they work the same way, only the usage syntax differs. See WikiMacros for more information. 119 119 120 120 '''Example:''' (''Restructured Text Processor''): 121 121 {{{ 122 #!python 122 123 from docutils.core import publish_string 123 124 … … 128 129 129 130 ---- 130 See also 131 See also: WikiMacros, WikiHtml, WikiRestructuredText, TracSyntaxColoring, WikiFormatting, TracGuide