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 shebang 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:
Code Highlighting Support
Trac includes processors to provide inline syntax highlighting for the following 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 possible to syntax-highlight the same languages that are supported when browsing source code. 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:
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
Also please read related information about
acne,
balding,
bloating,
bowel,
breast augmentation,
breast enhancement,
breast enlargement,
breast enhance,
breasts,
cellulite,
colitis,
constipation,
diarrhea,
diet,
ejaculation,
fat loss,
fibromyalgia,
hair loss,
hair growth,
alopecia,
baldness,
provillus,
heartburn,
heartworm,
hemorrhoids,
hgh,
hoodia,
hypothyroidism,
ibs,
insomnia,
menopause,
neuralgia,
no smoking,
osteoarthritis,
osteoporosis,
pain relief,
pheromone,
pimple,
quit smoking,
rheurmatism,
sleep aids,
sleep apnea,
sleep disorder,
smoking,
stop smoking,
thyroid,
weight,
wrinkle,
skin treatment,
skin care,
skin disorder,
skin disease,
skin cream,
human growth hormone,
anti aging,
hormone,
acanthosis,
blackheads,
hickey,
inflammatory disease,
rosacea,
skin condition,
whiteheads,
zits,
tendonitis,
complexion,
crinkle,
scar treatment,
callus,
mesotherapy,
endermologie,
liposuction,
adipose tissue,
fatty tissue,
flab,
mons pubis,
revitol,
arthritis,
back pain,
cartilage,
chronic pain,
depression,
sciatica,
shingles,
stiff joints,
stiffness,
prostate,
prostatitis,
drug testing,
drug-screening,
drug tests,
drug detox,
drug addiction,
drug rehab,
detoxification,
drug rehabilitation and
rapid detox.
See also:
Bentley,
Bugatti,
Buick,
Caterham,
Chrysler,
Citroen,
Dodge,
Ferrari,
Fiat,
Fisker,
Ford,
Harley,
Hummer,
Infiniti,
Kia,
Land rover,
Lexus,
Lotus,
Maybach,
Mazda,
Motorcycle,
New cars,
Oldsmobile,
Panoz,
Peugeot,
Pontiac,
Renault,
Rolls-royce,
Saab,
Subaru,
Toyota,
Vauxhall,
Volkswagen,
Yamaha,
Bentley,
Bugatti,
Buick,
Caterham,
Chrysler,
Citroen,
Dodge,
Ferrari,
Fiat,
Fisker,
Ford,
Harley,
Hummer,
Infiniti,
Kia,
Land rover,
Lexus,
Lotus,
Maybach,
Mazda,
Motorcycle,
New cars,
Oldsmobile,
Panoz,
Peugeot,
Pontiac,
Renault,
Rolls-royce,
Saab,
Subaru,
Toyota,
Vauxhall,
Volkswagen,
Yamaha,
Ahmad,
Amaurosis,
Apple,
Biaxin,
Bosch,
Bose,
Calamine,
Captopril,
Cholestatic,
Comoros,
Craniosynostosis,
Desmopressin,
Efudex,
Epipen,
G,
Gilmore girl,
Gorham,
Hemorrhoids,
Intercon,
Jazmin,
Latina,
Macules,
Makenzie,
Marvin,
Millard,
Norway,
Paige,
Peyronie,
Reynolds,
Sorghum,
Sqlite,
Thoracic,
Tretinoin.
See also:
Bentley,
Bugatti,
Buick,
Caterham,
Chrysler,
Citroen,
Dodge,
Ferrari,
Fiat,
Fisker,
Ford,
Harley,
Hummer,
Infiniti,
Kia,
Land rover,
Lexus,
Lotus,
Maybach,
Mazda,
Motorcycle,
New cars,
Oldsmobile,
Panoz,
Peugeot,
Pontiac,
Renault,
Rolls-royce,
Saab,
Subaru,
Toyota,
Vauxhall,
Volkswagen,
Yamaha,
Bentley,
Bugatti,
Buick,
Caterham,
Chrysler,
Citroen,
Dodge,
Ferrari,
Fiat,
Fisker,
Ford,
Harley,
Hummer,
Infiniti,
Kia,
Land rover,
Lexus,
Lotus,
Maybach,
Mazda,
Motorcycle,
New cars,
Oldsmobile,
Panoz,
Peugeot,
Pontiac,
Renault,
Rolls-royce,
Saab,
Subaru,
Toyota,
Vauxhall,
Volkswagen,
Yamaha,
Ahmad,
Amaurosis,
Apple,
Biaxin,
Bosch,
Bose,
Calamine,
Captopril,
Cholestatic,
Comoros,
Craniosynostosis,
Desmopressin,
Efudex,
Epipen,
G,
Gilmore girl,
Gorham,
Hemorrhoids,
Intercon,
Jazmin,
Latina,
Macules,
Makenzie,
Marvin,
Millard,
Norway,
Paige,
Peyronie,
Reynolds,
Sorghum,
Sqlite,
Thoracic,
Tretinoin.
Read more about whole world:
Benin,
Bermuda,
Bhutan,
Bolivia,
Brunei,
Cameroon,
Colombia,
Costa rica,
Croatia,
Cuba,
Dominica,
Ecuador,
Estonia,
Ethiopia,
Finland,
Ghana,
Guinea,
Honduras,
Hungary,
India,
Iran,
Israel,
Jordan,
Latvia,
Libya,
Macedonia,
Malawi,
Malta,
Mexico,
Micronesia,
Moldova,
Monaco,
Myanmar,
Namibia,
Nauru,
Nicaragua,
Puerto rico,
Russia,
Singapore,
Slovenia,
Somalia,
Sudan,
Suriname,
Syria,
Tanzania,
Tobago,
Trinidad,
Turkey,
Uganda,
Vanuatu.