Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 103 lines (70 sloc) 1.714 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102
from constants import html_entities
from mediawiki_parser import wikitextParser

def toolset():
    def render_title1(node):
        pass

    def render_title2(node):
        pass

    def render_title3(node):
        pass

    def render_title4(node):
        pass

    def render_title5(node):
        pass

    def render_title6(node):
        pass

    def render_raw_text(node):
        pass

    def render_paragraph(node):
        pass

    def render_wikitext(node):
        pass

    def render_body(node):
        pass

    def render_entity(node):
        value = '%s' % node.leaf()
        if value in html_entities:
            node.value = '%s' % unichr(html_entities[value])
        else:
            node.value = '&%s;' % value

    def render_lt(node):
        pass

    def render_gt(node):
        pass

    def render_tag_open(node):
        pass

    def render_tag_close(node):
        pass

    def render_tag_autoclose(node):
        pass

    def render_attribute(node):
        pass

    def render_table(node):
        pass

    def render_table_line_break(node):
        pass

    def render_table_header_cell(node):
        pass

    def render_table_normal_cell(node):
        pass

    def render_table_empty_cell(node):
        pass

    def render_table_caption(node):
        pass

    def render_preformatted(node):
        pass

    def render_hr(node):
        pass

    def render_li(node):
        pass

    def render_list(node):
        pass

    def render_url(node):
        pass

    def render_external_link(node):
        pass

    def render_internal_link(node):
        pass

    return locals()

def make_parser():
    return wikitextParser.make_parser(toolset())
Something went wrong with that request. Please try again.