Prune desk to what roledesk uses
Drops news's own sources (Bluesky, Mastodon, X, podcast) and the tools only they use (video, posts, walls), with the PodcastSource and segment_profile exports. scrape, article, checks, browser and framing stay: base.py imports scrape's Getter at module level and scrape imports the other four, so dropping them would mean editing the plugin contract. desk/README.md records the source of truth, the prune and how to refresh. All 371 tests pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0627b74f03
commit
24508dd6fc
15 files changed
+44
-2986
No files matched your search
@@ -17,19 +17,21 @@ source the same way.
|
||||
shared tools that acquire its content, what the shared
|
||||
summariser and tagger should do with it, how it is laid out
|
||||
registry.py finds the plugins on disk and builds the configured ones
|
||||
bluesky.py, mastodon.py, x.py, podcast.py the built-in ones
|
||||
rss.py feed fetching, which a publisher's plugin subclasses
|
||||
|
||||
Declaring a `spec` is optional in the contract and every plugin installed here
|
||||
declares one: `spec_of` adapts a plugin that declares none, and such a plugin
|
||||
runs exactly as it always has, but nothing about it is a claim its author made.
|
||||
|
||||
`PodcastSource` and `RssSource` are exported next to `Source` because that is
|
||||
how a publisher's plugin is written: subclass the class that already does the
|
||||
fetching, give it a name and a `spec`, and add nothing else.
|
||||
`plugins/lastweekin_ai.py` and `plugins/guardian.py` are the two models.
|
||||
`RssSource` is `shared` and is therefore not a plugin itself — there is no
|
||||
generic "Any RSS feed" source to paste a masthead into.
|
||||
`RssSource` is exported next to `Source` because that is how a publisher's
|
||||
plugin is written: subclass the class that already does the fetching, give it
|
||||
a name and a `spec`, and add nothing else. `RssSource` is `shared` and is
|
||||
therefore not a plugin itself — there is no generic "Any RSS feed" source to
|
||||
paste a masthead into.
|
||||
|
||||
roledesk's copy has no built-in sources: news's Bluesky, Mastodon, X and
|
||||
podcast plugins are pruned (see `desk/README.md`), and roledesk's one plugin
|
||||
is `plugins/ats.py`.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
@@ -41,7 +43,6 @@ from desk.sources.base import (
|
||||
MULTIWORD_OUTLETS, USER_AGENT, CheckResult, Getter, Source, Suggestion,
|
||||
entry_time, http_failure, outlet_name, parse_timestamp, split_label, strip_html,
|
||||
)
|
||||
from desk.sources.podcast import PodcastSource, segment_profile
|
||||
from desk.sources.registry import available
|
||||
from desk.sources.rss import RssSource, check_feed
|
||||
from desk.sources.spec import (
|
||||
@@ -71,7 +72,6 @@ __all__ = [
|
||||
"MarkRule",
|
||||
"OriginalView",
|
||||
"PluginSpec",
|
||||
"PodcastSource",
|
||||
"Presentation",
|
||||
"Profile",
|
||||
"QueueLayout",
|
||||
@@ -99,7 +99,6 @@ __all__ = [
|
||||
"outlet_name",
|
||||
"parse_timestamp",
|
||||
"problems",
|
||||
"segment_profile",
|
||||
"spec_of",
|
||||
"split_label",
|
||||
"strip_html",
|
||||
|
||||
Reference in new issue
Block a user