aboutsummaryrefslogtreecommitdiff
# 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()
)