buy levitra drug klonopin clomid success adipex prescription buy ambien online buy ephedrine generic medication prescription propecia canada prescription drugs propecia klonopin side effects soma online hydrocodone online is ultracet a narcotic lexapro cheap ultram cialis online slot machine celebrex dangers of ephedrine hydrocodone cod citrate generic sildenafil lipitor side effects valium online sildenafil viagra buy ephedra online phentermine clomid success cheap ephedra sildenafil viagra soma norvasc side effects vioxx celebrex buy phentermine low cost xenical klonopin side effects valium medicare prescription plan buy nexium buy xenical online discount phentermine cheap prescription drugs cheap ephedra levitra effects lexapro side tramadol online ambien clomid side effects clomid side effects generic sildenafil vicodin cheap diazepam cheap premarin buy levitra online buy provigil zoloft withdrawal lexapro withdrawal buy cheap ultracet bontril online meridia side effects prevacid solutab buy vicodin bupropion hcl generic cialis acomplia cheap prescriptions buy tadalafil generic prevacid buy meridia tramadol cod cheap fioricet buy online xenical valium online valtrex medication generic lipitor buy cheap fioricet buy ephedra online prevacid side effects acyclovir dosage clomid and twins tadalafil levitra generic cialis buy ephedrine getting alprazolam without a prescription dangers of ephedrine ephedrine tramadol cod cheap fioricet prednisone clomid side effects side effects of clomid celebrex side effects lexapro lexapro symptom withdrawal bupropion side effects prevacid order cialis canada mail order drug prescription cheap tramadol buy tetracycline cheap fioricet celebrex side effects liquid propecia buy cheap carisoprodol codeine addiction atenolol and flushing bupropion hcl ambien buy soma online no prescription diet pills klonopin wafer xanax online buy phentermine zoloft side effects soma online acyclovir zovirax buy ephedra online discount phentermine buy prevacid buy levitra online prevacid solutab klonopin buy ephedra online generic valium cheap phentermine celebrex cancer clomid side effects alcohol lexapro buy fioricet online lexapro withdrawal cheap ephedra cheap levitra hydrocodone online diethylpropion and tenuate generic propecia buy tramadol buy cheap fioricet generic ultram lorazepam online consultation xango alprazolam online liquid propecia buy ultracet aciphex buy online celebrex cancer sildenafil viagra zithromax azithromycin buy ephedra online drug klonopin norvasc 5 mg

Wiki Processors

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.

The wiki engine uses processors to allow using Restructured Text and raw HTML in any wiki text throughout Trac.

Using Processors

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.

Example 1 (inserting raw HTML in a wiki text):

{{{
#!html
<h1 style="color: orange">This is raw HTML</h1>
}}}

Results in:

This is raw HTML


Example 2 (inserting Restructured Text in wiki text):

{{{
#!rst
A header
--------
This is some **text** with a footnote [*]_.

.. [*] This is the footnote.
}}}

Results in:

A header

This is some text with a footnote [*].

[*]This is the footnote.

Example 3 (inserting a block of C source code in wiki text):

{{{
#!c
int main(int argc, char *argv[])
{
  printf("Hello World\n");
  return 0;
}
}}}

Results in:

int main(int argc, char *argv[])
{
  printf("Hello World\n");
  return 0;
}

Available Processors

The following processors are included in the Trac distribution:

Source Code Support

Trac includes processors to provide inline syntax highlighting for these languages:

  • c -- C
  • cpp -- C++
  • python -- Python
  • perl -- Perl
  • ruby -- Ruby
  • php -- PHP
  • asp --- ASP
  • sql -- SQL
  • xml -- XML

Note: Trac relies on external software packages for syntax coloring. See TracSyntaxColoring for more info.

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 Mimeview.py).

For example, you can write:

{{{
#!text/html
<h1>text</h1>
}}}

The result will be syntax highlighted html code. The same is valid for all other mime types supported.

For more processor macros developed and/or contributed by users, visit the macro bazaar:

http://projects.edgewall.com/trac/wiki/MacroBazaar


Advanced Topics: Developing Processor Macros

Developing processors is no different than WikiMacros. In fact they work the same way, only the usage syntax differs. See WikiMacros for more information.

Example: (Restructured Text Processor):

from docutils.core import publish_string

def execute(hdf, text, env):
    html = publish_string(text, writer_name = 'html')
    return html[html.find('<body>')+6:html.find('</body>')].strip()

See also : WikiMacros, WikiHtml, WikiRestructuredText, TracSyntaxColoring, WikiFormatting, TracGuide