blob: eb5e9fd1d1d46b57d3ae4f0e813c60f3d2efc987 (
about) (
plain)
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
|
# 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/en_US').glob('*.html.jinja')
if path.name != 'doc_base.html.jinja'
)
available_locales = tuple(
path.name
for path in (here / 'self_doc').iterdir()
if path.is_dir()
)
|