feat(presets): Add upstream-default preset and enhance demo preset
- Add upstream-default preset matching upstream mainline behavior: - Terminal display (not pygame) - No message overlay - Classic effects: noise, fade, glitch, firehose - Mixed positioning mode - Enhance demo preset to showcase sideline features: - Hotswappable effects via effect plugins - LFO sensor modulation (oscillator sensor) - Mixed positioning mode - Message overlay with ntfy integration - Includes hud effect for visual feedback - Update all presets to use mixed positioning mode - Update completion script for --positioning flag Usage: python -m mainline --preset upstream-default --display terminal python -m mainline --preset demo --display pygame
This commit is contained in:
@@ -60,6 +60,7 @@ class PipelinePreset:
|
||||
source_items: list[dict[str, Any]] | None = None # For ListDataSource
|
||||
enable_metrics: bool = True # Enable performance metrics collection
|
||||
enable_message_overlay: bool = False # Enable ntfy message overlay
|
||||
positioning: str = "mixed" # Positioning mode: "absolute", "relative", "mixed"
|
||||
|
||||
def to_params(self) -> PipelineParams:
|
||||
"""Convert to PipelineParams (runtime configuration)."""
|
||||
@@ -68,6 +69,7 @@ class PipelinePreset:
|
||||
params = PipelineParams()
|
||||
params.source = self.source
|
||||
params.display = self.display
|
||||
params.positioning = self.positioning
|
||||
params.border = (
|
||||
self.border
|
||||
if isinstance(self.border, bool)
|
||||
@@ -115,18 +117,38 @@ class PipelinePreset:
|
||||
source_items=data.get("source_items"),
|
||||
enable_metrics=data.get("enable_metrics", True),
|
||||
enable_message_overlay=data.get("enable_message_overlay", False),
|
||||
positioning=data.get("positioning", "mixed"),
|
||||
)
|
||||
|
||||
|
||||
# Built-in presets
|
||||
# Upstream-default preset: Matches the default upstream Mainline operation
|
||||
UPSTREAM_PRESET = PipelinePreset(
|
||||
name="upstream-default",
|
||||
description="Upstream default operation (terminal display, legacy behavior)",
|
||||
source="headlines",
|
||||
display="terminal",
|
||||
camera="scroll",
|
||||
effects=["noise", "fade", "glitch", "firehose"],
|
||||
enable_message_overlay=False,
|
||||
positioning="mixed",
|
||||
)
|
||||
|
||||
# Demo preset: Showcases hotswappable effects and sensors
|
||||
# This preset demonstrates the sideline features:
|
||||
# - Hotswappable effects via effect plugins
|
||||
# - Sensor integration (oscillator LFO for modulation)
|
||||
# - Mixed positioning mode
|
||||
# - Message overlay with ntfy integration
|
||||
DEMO_PRESET = PipelinePreset(
|
||||
name="demo",
|
||||
description="Demo mode with effect cycling and camera modes",
|
||||
description="Demo: Hotswappable effects, LFO sensor modulation, mixed positioning",
|
||||
source="headlines",
|
||||
display="pygame",
|
||||
camera="scroll",
|
||||
effects=["noise", "fade", "glitch", "firehose"],
|
||||
effects=["noise", "fade", "glitch", "firehose", "hud"],
|
||||
enable_message_overlay=True,
|
||||
positioning="mixed",
|
||||
)
|
||||
|
||||
UI_PRESET = PipelinePreset(
|
||||
@@ -201,6 +223,7 @@ def _build_presets() -> dict[str, PipelinePreset]:
|
||||
# Add built-in presets as fallback (if not in YAML)
|
||||
builtins = {
|
||||
"demo": DEMO_PRESET,
|
||||
"upstream-default": UPSTREAM_PRESET,
|
||||
"poetry": POETRY_PRESET,
|
||||
"pipeline": PIPELINE_VIZ_PRESET,
|
||||
"websocket": WEBSOCKET_PRESET,
|
||||
|
||||
Reference in New Issue
Block a user