| 1 | #!/usr/bin/env python3 |
| 2 | """ |
| 3 | PPT Master - Project Management Tool |
| 4 | |
| 5 | Stable CLI entry point for project creation, source import, validation, and |
| 6 | page-context diagnostics. Implementation lives in ``project_management/``. |
| 7 | |
| 8 | Usage: |
| 9 | python3 scripts/project_manager.py init <project_name> [--format ppt169] |
| 10 | python3 scripts/project_manager.py import-sources <project_path> <sources...> |
| 11 | python3 scripts/project_manager.py validate <project_path> |
| 12 | |
| 13 | Examples: |
| 14 | python3 scripts/project_manager.py init demo --format ppt169 |
| 15 | python3 scripts/project_manager.py validate projects/demo |
| 16 | |
| 17 | Dependencies: |
| 18 | Same as project_management.cli. |
| 19 | """ |
| 20 | |
| 21 | from __future__ import annotations |
| 22 | |
| 23 | import sys |
| 24 | from pathlib import Path |
| 25 | |
| 26 | _SCRIPTS_DIR = Path(__file__).resolve().parent |
| 27 | if str(_SCRIPTS_DIR) not in sys.path: |
| 28 | sys.path.insert(0, str(_SCRIPTS_DIR)) |
| 29 | |
| 30 | from attribution_guard import require_skill_integrity # noqa: E402 |
| 31 | from console_encoding import configure_utf8_stdio # noqa: E402 |
| 32 | |
| 33 | configure_utf8_stdio() |
| 34 | |
| 35 | from project_management.cli import ( # noqa: E402 |
| 36 | BITMAP_IMAGE_SUFFIXES, |
| 37 | IMAGE_ASSET_SUFFIXES, |
| 38 | SOURCE_DIRNAME, |
| 39 | SOURCE_TO_MD_TOOLS_DIR, |
| 40 | TABLE_TEXT_SUFFIXES, |
| 41 | TEXT_SOURCE_SUFFIXES, |
| 42 | TOOLS_DIR, |
| 43 | ProjectManager, |
| 44 | build_parser, |
| 45 | derive_url_basename, |
| 46 | is_url, |
| 47 | is_within_path, |
| 48 | main, |
| 49 | sanitize_name, |
| 50 | ) |
| 51 | from project_management.paths import ( # noqa: E402 |
| 52 | PROJECTS_ROOT, |
| 53 | REPO_ROOT, |
| 54 | SKILL_DIR, |
| 55 | ) |
| 56 | |
| 57 | __all__ = [ |
| 58 | "BITMAP_IMAGE_SUFFIXES", |
| 59 | "IMAGE_ASSET_SUFFIXES", |
| 60 | "PROJECTS_ROOT", |
| 61 | "REPO_ROOT", |
| 62 | "SKILL_DIR", |
| 63 | "SOURCE_DIRNAME", |
| 64 | "SOURCE_TO_MD_TOOLS_DIR", |
| 65 | "TABLE_TEXT_SUFFIXES", |
| 66 | "TEXT_SOURCE_SUFFIXES", |
| 67 | "TOOLS_DIR", |
| 68 | "ProjectManager", |
| 69 | "build_parser", |
| 70 | "derive_url_basename", |
| 71 | "is_url", |
| 72 | "is_within_path", |
| 73 | "main", |
| 74 | "sanitize_name", |
| 75 | ] |
| 76 | |
| 77 | |
| 78 | if __name__ == "__main__": |
| 79 | require_skill_integrity() |
| 80 | raise SystemExit(main()) |
| 81 |