MCPcopy Create free account

hub / github.com/Thysrael/Horizon / functions

Functions669 in github.com/Thysrael/Horizon

↓ 1 callersMethod_fetch_subreddit_html
( self, cfg: RedditSubredditConfig, since: datetime )
src/scrapers/reddit.py:167
↓ 1 callersMethod_fetch_subreddit_rss
( self, cfg: RedditSubredditConfig, since: datetime )
src/scrapers/reddit.py:111
↓ 1 callersMethod_fetch_user
( self, cfg: RedditUserConfig, since: datetime )
src/scrapers/reddit.py:284
↓ 1 callersMethod_fetch_user_events
Fetch public events for a user. Args: username: GitHub username since: Only fetch events after this time Ret
src/scrapers/github.py:70
↓ 1 callersMethod_fetch_watchlist
Fetch news for one watchlist via ``obb.news.company()``.
src/scrapers/openbb.py:116
↓ 1 callersMethod_get_client
(self, index: int)
src/ai/client.py:563
↓ 1 callersMethod_get_concurrency
Return the configured analysis concurrency, clamped to 1 or above.
src/ai/analyzer.py:38
↓ 1 callersMethod_get_concurrency
Return the configured enrichment concurrency, clamped to 1 or above.
src/ai/enricher.py:33
↓ 1 callersFunction_get_proxy
Resolve proxy from common env vars (PROXY, http_proxy, all_proxy).
src/scrapers/twitter_playwright.py:30
↓ 1 callersMethod_get_throttle_sec
Return the configured inter-item throttle, clamped to zero or above.
src/ai/analyzer.py:32
↓ 1 callersMethod_handle_response_status
Log and display HTTP response status by category. Even 2xx responses may contain platform-specific error codes in the JSON body (e.g.
src/services/webhook.py:653
↓ 1 callersFunction_is_feishu_platform
Return whether platform should use Feishu/Lark card rendering.
src/services/webhook.py:137
↓ 1 callersFunction_is_safe_markdown_link_url
Return True when a URL can be emitted as an active Markdown link.
src/ai/markdown_utils.py:38
↓ 1 callersMethod_is_temperature_unsupported
(message: str)
src/ai/client.py:320
↓ 1 callersFunction_listing_payload
()
tests/test_reddit.py:51
↓ 1 callersFunction_load_browser_cookies
Read browser-exported cookie JSON and convert to Playwright format.
src/scrapers/twitter_playwright.py:42
↓ 1 callersFunction_looks_like_api_key_value
(value: str)
src/ai/client.py:74
↓ 1 callersFunction_main
()
scripts/check_mcp.py:14
↓ 1 callersMethod_make_run_id
()
src/mcp/run_store.py:150
↓ 1 callersFunction_make_test_items
Create sample ContentItems for the test notification.
src/services/webhook_cli.py:22
↓ 1 callersMethod_make_title
(text: str)
src/scrapers/telegram.py:138
↓ 1 callersFunction_make_two_subreddit_config
(fetch_comments: int = 0)
tests/test_reddit.py:27
↓ 1 callersMethod_matches_keywords
Case-insensitive substring match against description, name, collections.
src/scrapers/ossinsight.py:144
↓ 1 callersFunction_metrics_snapshot
()
src/mcp/server.py:121
↓ 1 callersFunction_missing_api_key_message
(config: AIConfig)
src/ai/client.py:48
↓ 1 callersFunction_normalize_ollama_base_url
(base_url: str)
src/ai/client.py:80
↓ 1 callersFunction_old_comments_html
()
tests/test_reddit.py:107
↓ 1 callersMethod_parse_channel_html
( self, html: str, cfg: TelegramChannelConfig, since: datetime )
src/scrapers/telegram.py:66
↓ 1 callersMethod_parse_comment_count
(cls, thing: Any)
src/scrapers/reddit.py:269
↓ 1 callersMethod_parse_date
Parse publication date from feed entry. Args: entry: Feed entry data Returns: datetime: Parsed publication d
src/scrapers/rss.py:121
↓ 1 callersMethod_parse_date
Parse the publication date of an entry into aware UTC.
src/scrapers/google_news.py:189
↓ 1 callersMethod_parse_event
Parse GitHub event into ContentItem. Args: event: GitHub event data username: GitHub username Returns:
src/scrapers/github.py:117
↓ 1 callersMethod_parse_flair
(thing: Any)
src/scrapers/reddit.py:277
↓ 1 callersMethod_parse_item
(self, item: dict, since: datetime)
src/scrapers/twitter.py:227
↓ 1 callersMethod_parse_json_response
Try multiple strategies to extract a JSON object from an AI response. Returns the parsed dict, or None if all strategies fail.
src/ai/analyzer.py:25
↓ 1 callersMethod_parse_message
( self, msg_el, channel: str, since: datetime )
src/scrapers/telegram.py:79
↓ 1 callersMethod_parse_old_reddit_posts
( self, html: str, cfg: RedditSubredditConfig )
src/scrapers/reddit.py:197
↓ 1 callersMethod_parse_old_reddit_timestamp
(thing: Any)
src/scrapers/reddit.py:243
↓ 1 callersMethod_parse_post
( self, post: dict, comments: List[dict], subtype: str )
src/scrapers/reddit.py:444
↓ 1 callersMethod_parse_rss_date
(entry: dict)
src/scrapers/reddit.py:353
↓ 1 callersMethod_parse_seendate
Parse a GDELT ``seendate`` ("YYYYMMDDTHHMMSSZ") into aware UTC.
src/scrapers/gdelt.py:170
↓ 1 callersMethod_parse_story
(self, story: dict, comments: List[dict])
src/scrapers/hackernews.py:100
↓ 1 callersMethod_parse_tweet
Convert raw tweet dict to Horizon ContentItem.
src/scrapers/twitter_playwright.py:350
↓ 1 callersMethod_pick_summary_stage
(self, run_id: str)
src/mcp/service.py:603
↓ 1 callersFunction_preview_message
Render one dry-run preview using the same logic as the real sender.
src/services/webhook_cli.py:62
↓ 1 callersMethod_raw_to_item
Map one OpenBB news record into a ContentItem. Returns None when the record is too old, has no URL, or fails validation. OpenBB retur
src/scrapers/openbb.py:137
↓ 1 callersMethod_raw_to_item
Map one GDELT article record into a ContentItem. Returns None when the record has no URL/title or an unparseable ``seendate`` (publis
src/scrapers/gdelt.py:125
↓ 1 callersMethod_resolve_base_url
(cls, config: AIConfig)
src/ai/client.py:226
↓ 1 callersFunction_resolve_secrets_path
Resolve secrets config path via env and common locations.
src/mcp/horizon_adapter.py:315
↓ 1 callersMethod_row_to_item
Convert a raw OSS Insight row into a ContentItem.
src/scrapers/ossinsight.py:80
↓ 1 callersFunction_run_test
Execute the webhook test.
src/services/webhook_cli.py:87
↓ 1 callersMethod_score_distribution
(items: list[Any])
src/mcp/service.py:621
↓ 1 callersMethod_scrape_user
Scrape a single user's tweets via GraphQL interception.
src/scrapers/twitter_playwright.py:200
↓ 1 callersFunction_search_for_item
(item: ContentItem)
src/search.py:75
↓ 1 callersMethod_start_run
( self, token: str, users: List[str] )
src/scrapers/twitter.py:68
↓ 1 callersMethod_strip_html
(value: str)
src/scrapers/reddit.py:371
↓ 1 callersFunction_tag_matches_input
Check if a tag (or any of its aliases) matches the user input.
src/setup/presets.py:205
↓ 1 callersFunction_text
Build a Feishu plain text object.
src/services/webhook.py:142
↓ 1 callersMethod_time_operator
Build the Google News time operator from ``since``. Computes the number of whole hours between ``since`` and now (min 1). For windows
src/scrapers/google_news.py:113
↓ 1 callersMethod_token_fallback_mode
(message: str)
src/ai/client.py:450
↓ 1 callersMethod_total_fetched
(self, run_id: str, fallback: int)
src/mcp/service.py:613
↓ 1 callersFunction_transform_api_response
Transform horizon-site API response to the internal preset format. The API returns data in horizon-site's format (Category enum IDs like "AI_
src/setup/presets.py:50
↓ 1 callersMethod_try_import_obb
Try to import the OpenBB App, returning None if not installed. Importing ``openbb`` is expensive (loads every registered extension),
src/scrapers/openbb.py:60
↓ 1 callersMethod_validate_config
Validate webhook URL configuration and print warnings for skip scenarios. Raises ValueError when URL is present but invalid. Sets sel
src/services/webhook.py:273
↓ 1 callersMethod_validate_url
Validate webhook URL has a valid scheme (http/https) and hostname. Raises: ValueError: If the URL is empty, has wrong scheme, no h
src/services/webhook.py:240
↓ 1 callersMethod_web_search
Search the web for context via DuckDuckGo. Returns: List of dicts with keys: title, url, body
src/ai/enricher.py:70
↓ 1 callersMethodadd_subscriber
Adds a new subscriber email.
src/storage/manager.py:132
↓ 1 callersFunctionbuild_config
Step 6: Assemble the final Config object. Args: ai_config: AI configuration. selected_sources: List of selected source dicts.
src/setup/wizard.py:191
↓ 1 callersFunctionconfigure_ai
Step 1: Configure AI provider. Returns: AIConfig if configured, None if user skips.
src/setup/wizard.py:44
↓ 1 callersFunctiondicts_to_items
Deserialize ContentItem list.
src/mcp/horizon_adapter.py:249
↓ 1 callersFunctionfetch_presets
Fetch presets from the horizon-site API. Returns: Dict in the internal preset format (with "domains" key), or None if the fetch f
src/setup/presets.py:25
↓ 1 callersFunctionget_ai_recommendations
Ask AI to recommend additional sources beyond presets. Args: ai_config: AI configuration for creating the client. interests: User
src/setup/ai_recommend.py:12
↓ 1 callersFunctionget_ai_recommendations_sync
Synchronous wrapper for get_ai_recommendations.
src/setup/ai_recommend.py:64
↓ 1 callersMethodget_effective_config
Return effective config after optional source filtering.
src/mcp/service.py:140
↓ 1 callersFunctionget_interests
Step 2: Get user's interest description. Returns: Free-form interest string.
src/setup/wizard.py:112
↓ 1 callersFunctionget_tag_aliases
Return all aliases for a canonical tag (empty list if unknown).
src/setup/tag_aliases.py:111
↓ 1 callersFunctionget_usage_snapshot
Return a snapshot of accumulated token usage.
src/ai/tokens.py:53
↓ 1 callersFunctionload_presets
Load presets from API (preferred) or local file (fallback). Args: presets_path: Path to the local presets JSON file for fallback.
src/setup/presets.py:101
↓ 1 callersFunctionmain
Main CLI entry point.
src/main.py:34
↓ 1 callersFunctionmain
CLI entry point for horizon-webhook.
src/services/webhook_cli.py:157
↓ 1 callersFunctionmain
Run MCP server over stdio.
src/mcp/server.py:497
↓ 1 callersFunctionmarkSemanticElements
Add semantic classes to tag lines, source lines, and background paragraphs
docs/assets/js/horizon.js:25
↓ 1 callersFunctionmatch_sources
Match user interest description against individual sources. Scores each source based on: - Category keyword matches (+1.0 per keyword) -
src/setup/presets.py:217
↓ 1 callersFunctionmerge_configs
Merge new config into existing config, deduplicating sources. Rules: - ai / filtering: use new values (full replacement) - sources: dedup
src/setup/wizard.py:294
↓ 1 callersFunctionprint_banner
Print the application banner.
src/main.py:18
↓ 1 callersFunctionprint_banner
Print the setup wizard banner.
src/setup/wizard.py:28
↓ 1 callersFunctionprocessScoreBadges
Replace ⭐️ N/10 with a colored badge in h2, h3, and li elements
docs/assets/js/horizon.js:5
↓ 1 callersMethodremove_subscriber
Removes a subscriber email.
src/storage/manager.py:139
↓ 1 callersMethodrun_pipeline
( self, hours: int = 24, languages: list[str] | None = None, threshold: float
src/mcp/service.py:487
↓ 1 callersMethodsave_config
Save configuration to config.json, optionally backing up the existing file. Args: config: The Config object to save.
src/storage/manager.py:92
↓ 1 callersFunctionsearch_hn
Search HN Algolia. Returns list of {title, url, source, score, num_comments, date}.
src/search.py:16
↓ 1 callersFunctionsearch_reddit
Search Reddit JSON API. Returns list of {title, url, source, score, num_comments, subreddit, date}.
src/search.py:39
↓ 1 callersFunctionselect_sources
Step 5: Interactive source selection with a rich table. Args: preset_sources: Sources matched from presets. ai_sources: Sources r
src/setup/wizard.py:129
↓ 1 callersMethodsend_webhook
Send a webhook notification using the configured webhook settings.
src/mcp/service.py:637
↓ 1 callersFunctionsetupLanguageToggle
Set up EN/中文 language toggle as a page-level control
docs/assets/js/horizon.js:45
↓ 1 callersFunctionswitchArticleLang
(lang)
docs/assets/js/horizon.js:95
Method__call__
(self, cfg)
tests/test_chained_client.py:35
Method__enter__
(self)
tests/test_email.py:17
Method__exit__
(self, exc_type, exc, tb)
tests/test_email.py:20
Method__init__
Initialize orchestrator. Args: config: Application configuration storage: Storage manager
src/orchestrator.py:48
← previousnext →201–300 of 669, ranked by callers