logo4 Evolution is progress—                          
progress is creativity.        

Adding Creole Macros

I use Creole as Markup language. Although the documentation revealed a considerable flexibility, I was unable to google reliable example until today.

Macros in Creole

Simple Creole Macros

Today I found this macro documentation page. The quote macro is easily implemented, and the spreadsheet will be implemented here on this page for the first time.

"This is a test quotation"

Complex Creole Macros

A nice collection of Creole macros can be found here.

The dialect initializing the macros is given by this code macro.

dialect = create_dialect(
    non_bodied_macros= macros.non_bodied_macros,
    bodied_macros= macros.bodied_macros,

And the code that transforms the table of content tag.

def wikihtml(value):
    stream = text2html.generate(value,environ=env)
    if 'toc' in env:
        stream = Stream(list(stream))
        stream = stream.filter(Replacer('toc', stream.filter(TOCMaker(env['toc']))))            
    return stream.render(method='xhtml', strip_whitespace=False, encoding='utf-8')

The table of content macro needs some additional files to be installed. The file toc.py is downloadable from that website too.

  1. Macros in Creole
    1. Simple Creole Macros
    2. Complex Creole Macros
  2. Todo


The following tasks remain to become implemented:

  • Inclusion of sub pages in order to structure this website as a real living fauceir.
  • Implementing a reference database and to include those reference in a wiki style

Tags: Software


Altruism is a behavioral pattern which is in stark contrast to a fauceir's normal drive for persistence and dominance. Altruism drains off resources from a fauceir for the benefit of an other fauceir. The ultimate degree of altruism is self-sacrifice.

Tags: Behavior


(c) Mato Nagel, Weißwasser 2004-2013, Disclaimer