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. |
|
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_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: One of ‘icon’, ‘card’, ‘full’ fallback: If True, return default template if plugin template not found