- Fix TerminalDisplay: add screen clear each frame (cursor home + erase down) - Fix CameraStage: use set_canvas_size instead of read-only viewport properties - Fix Glitch effect: preserve visible line lengths, remove cursor positioning - Fix Fade effect: return original line when fade=0 instead of empty string - Fix Noise effect: use input line length instead of terminal_width - Remove HUD effect from all presets (redundant with border FPS display) - Add regression tests for effect dimension stability - Add docs/ARCHITECTURE.md with Mermaid diagrams - Add mise tasks: diagram-ascii, diagram-validate, diagram-check - Move markdown docs to docs/ (ARCHITECTURE, Refactor, hardware specs) - Remove redundant requirements files (use pyproject.toml) - Add *.dot and *.png to .gitignore Closes #25
1.9 KiB
1.9 KiB
name, description, compatibility, metadata
| name | description | compatibility | metadata | ||||
|---|---|---|---|---|---|---|---|
| mainline-sources | Adding new RSS feeds and data sources to Mainline | opencode |
|
What This Skill Covers
This skill covers how to add new data sources (RSS feeds, poetry) to Mainline.
Key Concepts
Feeds Dictionary (engine/sources.py)
All feeds are defined in a simple dictionary:
FEEDS = {
"Feed Name": "https://example.com/feed.xml",
# Category comments help organize:
# Science & Technology
# Economics & Business
# World & Politics
# Culture & Ideas
}
Poetry Sources
Project Gutenberg URLs for public domain literature:
POETRY_SOURCES = {
"Author Name": "https://www.gutenberg.org/cache/epub/1234/pg1234.txt",
}
Language & Script Mapping
The sources.py also contains language/script detection mappings used for auto-translation and font selection.
Adding a New RSS Feed
- Edit
engine/sources.py - Add entry to
FEEDSdict under appropriate category:"My Feed": "https://example.com/feed.xml", - The feed will be automatically discovered on next run
Feed Requirements
- Must be valid RSS or Atom XML
- Should have
<title>elements for items - Must be HTTP/HTTPS accessible
Adding Poetry Sources
- Edit
engine/sources.py - Add to
POETRY_SOURCESdict:"Author": "https://www.gutenberg.org/cache/epub/XXXX/pgXXXX.txt",
Poetry Requirements
- Plain text (UTF-8)
- Project Gutenberg format preferred
- No DRM-protected sources
Data Flow
Feeds are fetched via engine/fetch.py:
fetch_feed(url)- Fetches and parses RSS/Atom- Results cached for fast restarts
- Filtered via
engine/filter.pyfor content cleaning
Categories
Organize new feeds by category using comments:
- Science & Technology
- Economics & Business
- World & Politics
- Culture & Ideas