aboutsummaryrefslogtreecommitdiff
path: root/src/hydrilla/proxy/self_doc.py
blob: 838df57fca01b104433102fd31cf416c1951acaf (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# SPDX-License-Identifier: CC0-1.0

# Copyright (C) 2022 Wojtek Kosior <koszko@koszko.org>
#
# Available under the terms of Creative Commons Zero v1.0 Universal.

import jinja2

from pathlib import Path


here = Path(__file__).resolve().parent

loader = jinja2.PackageLoader(__package__, package_path='self_doc')

suffix_len = len('.html.jinja')
page_names = frozenset(
    path.name[:-suffix_len]
    for path in (here / 'self_doc').glob('*.html.jinja')
    if path.name != 'doc_base.html.jinja'
)