Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)

        @register.filter
def present(value):
    value = value.replace('\r', '')\
    .replace('Methods\n=======', '')\
    .replace('Tables & Figures\n================', '')\
    .replace('Tables', '')\
    .replace('.. image: ', '.. image:: ')\
    .replace('\n\n======\n\n', '')\
    .replace('Table 1: ', '')\
    .replace('.. header: ', '.. header:: ')
    print("apps.articles.templatetags.presenter.present: Tables in value = %s" % ('Tables' in value))
    rc = re.compile('(-{3,}|~{3,})')
    def translate(match):
        string = match.group(0)
        length = len(string)
        return "=" * length
    return rc.sub(translate, value)
        


src/d/e/denigma-HEAD/denigma/apps/articles/views.py   denigma(Download)
 
from manager import referencing
from templatetags.presenter import present
from templatetags.formatter import header, footer, link, coverPage, pageBreak, tablesAndFigures, glossary
from templatetags.tabling import tables
def presentation(request, slug, template='articles/view.html'):
    article = Entry.objects.get(slug=slug)
    article.text = present(referencing(article))
    output = open('presentation.rst', 'w')
    output.write(article.text)