| name | newsletter-events-add-source |
| description | Add Instagram accounts or web aggregators to sources.yaml configuration |
This skill uses a dispatcher pattern with separate workflows:
- For web URLs → Read
workflows/add-web-aggregator.md(HAS MANDATORY PROFILING) - For Instagram → Read
workflows/add-instagram.md
DO NOT just edit sources.yaml directly. Follow the workflows.
All sources are stored in ~/.config/local-media-tools/sources.yaml.
Source Types & Routing
| Type | Detection | Workflow |
|---|---|---|
@handle or alphanumeric handle |
workflows/add-instagram.md |
|
| Web Aggregator | http:// or https:// URL |
workflows/add-web-aggregator.md |
facebook.com/events/* |
Not stored - use /research directly |
Key Differences
- Instagram: Simple add - no profiling needed
- Web Aggregator: Requires profiling to discover optimal scraping strategy
Examples:
@localvenue @musicbar- Add Instagram accountshttps://hudsonvalleyevents.com- Add web aggregator (will be profiled)@venue1 and https://events.com- Mix of sources
Note: For Facebook events, use /research https://facebook.com/events/123456 instead.
Provide the source(s):
Analyze user input and classify each source:
import re
sources = {"instagram": [], "web": [], "facebook": []}
for token in user_input.replace(",", " ").replace(" and ", " ").split():
token = token.strip()
if not token:
continue
if "facebook.com/events/" in token:
sources["facebook"].append(token)
elif token.startswith("@") or re.match(r"^[a-zA-Z][a-zA-Z0-9_.]+$", token):
sources["instagram"].append(token.lstrip("@").lower())
elif token.startswith("http://") or token.startswith("https://"):
sources["web"].append(token)
Step 2: Handle Facebook URLs
If any Facebook URLs detected, inform user:
Facebook events are not stored in configuration.
Pass URLs directly to /research instead:
/research https://facebook.com/events/123456
Continue processing other sources.
Step 3: Route to Workflows
For Instagram handles:
If sources["instagram"] is not empty:
- Read
workflows/add-instagram.md - Follow that workflow for all Instagram handles
- Collect results
For Web URLs:
If sources["web"] is not empty:
- Read
workflows/add-web-aggregator.md - Follow that workflow for EACH web URL (profiling is per-source)
- Collect results
IMPORTANT: Process web sources one at a time since each requires interactive profiling.
Step 4: Report Combined Results
After both workflows complete, display combined summary:
| Type | Source | Name | Status |
|---|---|---|---|
| @localvenue | Local Venue | Added | |
| @musicbar | Music Bar | Already exists | |
| Web | greatnortherncatskills.com | Great Northern Catskills | Added (profiled) |
Config saved to ~/.config/local-media-tools/sources.yaml
Run /newsletter-events:research to scrape these sources.