from pathlib import Path import os import sys # Guard BEFORE importing rights_filter so a 3.13-only syntax in the package # surfaces this friendly message instead of a raw SyntaxError/ImportError. if sys.version_info < (3, 13): sys.exit( "Copyrighter requires Python 3.13+ - activate the offline venv " "(see docs/operations/offline-install.md)." ) ROOT = Path(__file__).resolve().parent SRC = ROOT / "src" if str(SRC) not in sys.path: sys.path.insert(0, str(SRC)) from rights_filter.server.__main__ import main if __name__ == "__main__": # Anchor the working directory to the repo root so the cwd-relative default # paths (data/, web/operator-gui) resolve the same regardless of where the # launcher was invoked from. os.chdir(ROOT) main()