Initial commit: Screen Leads app
Screen-capture lead tool: capture agent, Claude vision extractor with pluggable site recipes (LinkedIn), canonical funnel model, SQLite storage, FastAPI backend, dashboard, and setup/run scripts. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
"""Recipe registry. Register new site recipes here — nothing else changes."""
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Optional
|
||||
|
||||
from core.models import PageContext, PageMatch
|
||||
from .base import SiteRecipe
|
||||
from .linkedin import LinkedInRecipe
|
||||
|
||||
REGISTRY: list[SiteRecipe] = [
|
||||
LinkedInRecipe(),
|
||||
]
|
||||
|
||||
|
||||
def enabled_recipes() -> list[SiteRecipe]:
|
||||
return [r for r in REGISTRY if r.enabled]
|
||||
|
||||
|
||||
def match(ctx: PageContext) -> Optional[tuple[SiteRecipe, PageMatch]]:
|
||||
"""Return the first enabled recipe that recognises the page context."""
|
||||
for recipe in enabled_recipes():
|
||||
m = recipe.matches(ctx)
|
||||
if m is not None:
|
||||
return recipe, m
|
||||
return None
|
||||
Reference in New Issue
Block a user