Euler source The code that runs the solver shell and this site, version 4.34.2 Repository on GitHub

euler-content: the published content, packaged — what the public site serves to signed-out visitors.

23 lines of Python Raw file Open on GitHub

#!/usr/bin/env python3.14
# -*- coding: utf-8 -*-
"""euler-content: the published content, packaged — what the public site serves to signed-out visitors.

`tree/` mirrors the repository's own layout for the public paths — `README.md`, `docs/`,
`blogs/`, `solutions/public/`, `solutions/problems.json`, and the code the code viewer shows
(`packages/`, `scripts/` and the root files that configure them) — so the site reads it
exactly as it reads a clone. It holds no
`solutions/private`: the private solutions are not in this package at all
(`scripts/content/stage.py` builds it from tracked files and refuses one).
"""
from __future__ import annotations

__all__ = ['root']

from importlib.resources import as_file, files
from pathlib import Path


def root() -> Path:
    """The installed content tree (a real directory: the wheel installs unzipped)."""
    with as_file(files(__name__) / 'tree') as path:
        return Path(path)