# Path: regenesis/core.py
# def get_catalog(catalog_name):
# 
# Path: regenesis/util.py
# def make_key(*a):
# def flatten(d, sep='_'):
# 
# Path: regenesis/views/util.py
# def dimension_type_text(type_name):
#     if type_name.startswith('ZI-MM'):
#         return 'Zeitattribut'
#     if type_name.startswith('K-REG'):
#         return 'Geographisches Attribut'
#     if type_name.startswith('K-SACH'):
#         return 'Sachattribut'
#     if type_name.startswith('W-MM'):
#         return 'Messwert'
#     return type_name
# 
# Path: regenesis/views/dimension.py
# def get_statistics(dimension_name=None):
# def view(catalog, name):
# 
# Path: regenesis/views/statistic.py
# ADM_RANKS = {
#     'gemein': 1,
#     'kreise': 2,
#     'regbez': 3,
#     'dland': 4,
#     'dinsg': 5
# }
# def make_keywords(titles):
# def get_cubes(statistic_name=None):
# def view(catalog, slug, name):
# 
# Path: regenesis/views/catalog.py
# def view(catalog):


from flask import render_template, Response, request
from flask import session, redirect, flash, Markup, url_for
from regenesis.core import app
from regenesis.util import slugify as _slugify
from regenesis.views.util import dimension_type_text as _dimension_type_text
from regenesis.views.dimension import blueprint as dimension_blueprint
from regenesis.views.statistic import blueprint as statistic_blueprint
from regenesis.views.catalog import blueprint as catalog_blueprint
        s = s.unescape()
    s = s.replace('\n', '<br>\n')
    return Markup(s)


@app.template_filter('wraptext')
def text_filter_wrapped(s):
    if s is None:
        return ''
    if type(s) == 'Markup':
        s = s.unescape()
    s = s.replace('\n \n', '</p><p>\n')
    return Markup('<p>' + s + '</p>')


@app.template_filter()
def slugify(text):
    return _slugify(text)


@app.context_processor
def set_template_globals():
    return {
        'slugify': _slugify,
        'API': app.config.get('API_ENDPOINT')
    }


@app.template_filter()
def dimension_type_text(type_name):

# Path: regenesis/core.py
# def get_catalog(catalog_name):
# 
# Path: regenesis/util.py
# def make_key(*a):
# def flatten(d, sep='_'):
# 
# Path: regenesis/views/util.py
# def dimension_type_text(type_name):
#     if type_name.startswith('ZI-MM'):
#         return 'Zeitattribut'
#     if type_name.startswith('K-REG'):
#         return 'Geographisches Attribut'
#     if type_name.startswith('K-SACH'):
#         return 'Sachattribut'
#     if type_name.startswith('W-MM'):
#         return 'Messwert'
#     return type_name
# 
# Path: regenesis/views/dimension.py
# def get_statistics(dimension_name=None):
# def view(catalog, name):
# 
# Path: regenesis/views/statistic.py
# ADM_RANKS = {
#     'gemein': 1,
#     'kreise': 2,
#     'regbez': 3,
#     'dland': 4,
#     'dinsg': 5
# }
# def make_keywords(titles):
# def get_cubes(statistic_name=None):
# def view(catalog, slug, name):
# 
# Path: regenesis/views/catalog.py
# def view(catalog):


# Path: regenesis/web.py
from flask import render_template, Response, request
from flask import session, redirect, flash, Markup, url_for
from regenesis.core import app
from regenesis.util import slugify as _slugify
from regenesis.views.util import dimension_type_text as _dimension_type_text
from regenesis.views.dimension import blueprint as dimension_blueprint
from regenesis.views.statistic import blueprint as statistic_blueprint
from regenesis.views.catalog import blueprint as catalog_blueprint

        s = s.unescape()
    s = s.replace('\n', '<br>\n')
    return Markup(s)


@app.template_filter('wraptext')
def text_filter_wrapped(s):
    if s is None:
        return ''
    if type(s) == 'Markup':
        s = s.unescape()
    s = s.replace('\n \n', '</p><p>\n')
    return Markup('<p>' + s + '</p>')


@app.template_filter()
def slugify(text):
    return _slugify(text)


@app.context_processor
def set_template_globals():
    return {
        'slugify': _slugify,
        'API': app.config.get('API_ENDPOINT')
    }


@app.template_filter()
def dimension_type_text(type_name):

    return _dimension_type_text(type_name)