pig.py/serp.py
Russell Ballestrini c7c20c5bce Refactor serp.py into serp/ package, add /eggs endpoint
- Extract serp.py into serp/ package for better testability
  - serp/app.py: FastAPI app, LanguageMiddleware
  - serp/server.py: All route handlers
  - serp/i18n.py: Translations, LANG_NAMES with flags
  - serp/models.py: CrawlRequest model
  - serp/archive.py: Tarball handling
  - serp/logging.py: Job logging
  - serp/utils.py: slugify function
- Add /eggs endpoint listing easter eggs:
  - #0: ?lang=XX forces language via middleware
  - #1: OVER_9000 pagination limit
  - #2: The 72 Rules of St. Benedict (A Way)
- Fix test module import issue (app_module -> app_config)
- LANG_NAMES includes flags and codes (e.g., 🇺🇸 EN English)
2026-01-05 19:16:04 -05:00

14 lines
274 B
Python

#!/usr/bin/env python3
"""
neopig SERP - Search Engine Results Page
Thin wrapper for CLI compatibility. All logic is in serp/server.py.
Usage:
python serp.py --port 31337 --vault ./vault --db neopig.db
"""
from serp import main
if __name__ == "__main__":
main()