archivebox.plugins.discovery
Module Contents
Classes
Functions
Return the exact plugin directories exposed by the shared catalog. |
|
Get list of available plugins by discovering plugin directories. |
|
Get the base plugin name without numeric prefix. |
|
Return the canonical ArchiveResult name and its declared historic aliases. |
|
Return plugin-owned ArchiveResult names eligible for snapshot thumbnails. |
|
Return ArchiveResult names for a plugin-owned snapshot presentation role. |
|
Select the first successful result declared for a presentation role. |
|
Load optional plugin-owned presentation hooks declared in manifests. |
|
Load one plugin’s optional presentation hooks module. |
|
Return whether a plugin renders its full template through a response hook. |
|
Collect additional cards from plugin-owned presentation hooks. |
|
Give plugin presentation hooks the first chance to serve replay assets. |
|
Let plugin presentation hooks render a saved output’s full template. |
|
Get the list of enabled plugins based on config and available hooks. |
|
Return plugins that declare both standalone search commands. |
|
Discover all plugin config.json schemas. |
|
Extract special config keys for a plugin following naming conventions. |
|
Get a plugin template by plugin name and template type. |
|
Get the icon for a plugin from its icon.html template. |
Data
API
- archivebox.plugins.discovery.iter_plugin_dirs() list[pathlib.Path][source]
Return the exact plugin directories exposed by the shared catalog.
- archivebox.plugins.discovery.get_plugin_config_resolver() abx_dl.catalog.PluginConfigResolver[source]
- archivebox.plugins.discovery.get_plugins() list[str][source]
Get list of available plugins by discovering plugin directories.
Returns plugin directory names for any plugin that exposes hooks, config.json, or a standardized templates/icon.html asset. This includes non-extractor plugins such as binary providers and shared base plugins.
- archivebox.plugins.discovery.get_plugin_name(plugin: str) str[source]
Get the base plugin name without numeric prefix.
Examples: ‘10_title’ -> ‘title’ ‘26_readability’ -> ‘readability’ ‘50_parse_html_urls’ -> ‘parse_html_urls’
- archivebox.plugins.discovery.get_archive_result_names(plugin_name: str) tuple[str, ...][source]
Return the canonical ArchiveResult name and its declared historic aliases.
- archivebox.plugins.discovery.get_plugin_output_extension_preference(plugin_name: str) tuple[tuple[str, ...], ...] | None[source]
- archivebox.plugins.discovery.get_snapshot_thumbnail_card_order() dict[str, int][source]
Return plugin-owned ArchiveResult names eligible for snapshot thumbnails.
- archivebox.plugins.discovery.get_snapshot_role_names(role: str) tuple[str, ...][source]
Return ArchiveResult names for a plugin-owned snapshot presentation role.
- archivebox.plugins.discovery.get_snapshot_role_result(results, role: str)[source]
Select the first successful result declared for a presentation role.
- archivebox.plugins.discovery.get_plugin_presentation_modules() tuple[types.ModuleType, ...][source]
Load optional plugin-owned presentation hooks declared in manifests.
- archivebox.plugins.discovery.get_plugin_presentation_module(plugin_name: str) types.ModuleType | None[source]
Load one plugin’s optional presentation hooks module.
- archivebox.plugins.discovery.plugin_has_custom_full_response(plugin_name: str) bool[source]
Return whether a plugin renders its full template through a response hook.
- archivebox.plugins.discovery.get_extra_snapshot_output_cards(outputs: list[dict[str, Any]]) list[dict[str, Any]][source]
Collect additional cards from plugin-owned presentation hooks.
- archivebox.plugins.discovery.serve_plugin_replay_asset(path: str, config, response_class)[source]
Give plugin presentation hooks the first chance to serve replay assets.
- archivebox.plugins.discovery.render_plugin_full_response(path: str, output_url: str, **kwargs)[source]
Let plugin presentation hooks render a saved output’s full template.
- archivebox.plugins.discovery.get_enabled_plugins(config: archivebox.plugins.discovery.ConfigLookup | None = None, **config_kwargs: Any) list[str][source]
Get the list of enabled plugins based on config and available hooks.
Filters plugins by USE_/SAVE_ flags. Only returns plugins that are enabled.
- archivebox.plugins.discovery.get_search_backends()[source]
Return plugins that declare both standalone search commands.
- archivebox.plugins.discovery.discover_plugin_configs() dict[str, dict[str, Any]][source]
Discover all plugin config.json schemas.
Each plugin can define a config.json file with JSONSchema defining its configuration options. This is intentionally cached because these schemas are plugin package metadata, not live user config; runtime values still come from env/db config at each callsite.
- archivebox.plugins.discovery.get_plugin_special_config(plugin_name: str, config: archivebox.plugins.discovery.ConfigLookup, _visited: set[str] | None = None) archivebox.plugins.discovery.PluginSpecialConfig[source]
Extract special config keys for a plugin following naming conventions.
ArchiveBox recognizes 3 special config key patterns per plugin: - {PLUGIN}_ENABLED: Enable/disable toggle (default True) - {PLUGIN}_TIMEOUT: Plugin-specific timeout (fallback to TIMEOUT, default 300) - {PLUGIN}_BINARY: Primary binary path (default to plugin_name)
- archivebox.plugins.discovery.get_plugin_template(plugin: str, template_name: str, fallback: bool = True) str | None[source]
Get a plugin template by plugin name and template type.
Args: plugin: Plugin name (e.g., ‘screenshot’, ‘15_singlefile’) template_name: A template slot such as ‘icon’, ‘card’, or ‘full’. fallback: If True, return default template if plugin template not found