Open Source Stenography Software providing real-time stenographic typing, machine support, and plugin architecture.
—
The Plover plugin registry provides centralized management for all extensible components including machines, dictionaries, GUI tools, extensions, and other plugin types. It enables dynamic discovery, registration, and access to plugins throughout the application.
Central registry for plugin discovery and management with support for dynamic registration and plugin enumeration.
class Registry:
"""Central plugin registry for all Plover extensions."""
PLUGIN_TYPES = (
'command', 'dictionary', 'extension', 'gui',
'gui.qt.machine_option', 'gui.qt.tool', 'machine',
'macro', 'meta', 'system'
)
def register_plugin(self, plugin_type: str, name: str, obj) -> None:
"""
Register a plugin with the registry.
Args:
plugin_type: Type of plugin from PLUGIN_TYPES
name: Unique name for the plugin
obj: Plugin class or object to register
Registers plugin for discovery by other components.
"""
def get_plugin(self, plugin_type: str, plugin_name: str) -> Plugin:
"""
Get specific plugin by type and name.
Args:
plugin_type: Type of plugin to retrieve
plugin_name: Name of specific plugin
Returns:
Plugin wrapper object with metadata
Raises:
KeyError: If plugin not found
"""
def list_plugins(self, plugin_type: str) -> list:
"""
List all plugins of specified type.
Args:
plugin_type: Type of plugins to list
Returns:
List of Plugin objects of specified type
Useful for enumerating available options like machines or dictionaries.
"""
def list_distributions(self) -> list:
"""
List all plugin distributions.
Returns:
List of distribution objects containing plugins
Shows all installed packages that provide plugins.
"""
def update(self) -> None:
"""
Update registry from entry points.
Scans installed packages for new plugins and updates
the registry with any discoveries.
"""registry: Registry
"""
Global registry instance used throughout Plover.
All components access plugins through this shared instance.
"""Individual plugin metadata and access wrapper.
class Plugin:
"""Wrapper for individual plugin with metadata."""
def __init__(self, plugin_type: str, name: str, obj):
"""
Initialize plugin wrapper.
Args:
plugin_type: Type classification of plugin
name: Unique identifier for plugin
obj: Actual plugin class or object
"""
plugin_type: str
"""Type classification from Registry.PLUGIN_TYPES"""
name: str
"""Unique plugin identifier"""
obj: object
"""Actual plugin class or implementation object"""
__doc__: str
"""Plugin documentation string"""Execute specific stenographic commands or configuration changes.
Examples:
set_config: Configuration modification commandsSupport different dictionary file formats for stenographic translations.
Examples:
json: JSON dictionary format supportrtf: RTF/CRE dictionary format supportBackground extensions that enhance Plover functionality.
Examples:
Main GUI interface implementations.
Examples:
none: Headless operation modeqt: Qt-based graphical interfaceMachine-specific configuration dialogs for the Qt GUI.
Specialized tools and windows within the Qt GUI.
Examples:
add_translation: Translation addition toollookup: Dictionary lookup toolpaper_tape: Stroke display toolsuggestions: Suggestion display toolStenotype machine drivers for hardware communication.
Examples:
Gemini PR: Gemini PR protocol machineKeyboard: Computer keyboard inputPassport: Passport stenotype machineProCAT: ProCAT stenotype machineStentura: Stentura stenotype machineTX Bolt: TX Bolt protocol machineAutomated stroke sequences and text manipulation macros.
Examples:
repeat_last_stroke: Repeat previous strokeretro_delete_space: Delete preceding spaceretro_insert_space: Insert space before textretro_toggle_asterisk: Toggle asterisk in previous strokeundo: Undo previous translationText formatting and output manipulation commands.
Examples:
attach: Control text attachmentcase: Case formatting controlcarry_capitalize: Capitalization carry-forwardcomma: Comma insertion with formattingcommand: Execute system commandsglue: Text gluing without spaceskey_combo: Send key combinationsmode: Mode switching controlretro_case: Retroactive case changesretro_currency: Currency formattingstop: Stop translation processingword_end: Word ending controlStenotype system definitions with key layouts and rules.
Examples:
English Stenotype: Standard English stenotype systemfrom plover.registry import registry
# Update registry from installed packages
registry.update()
# List available machines
machines = registry.list_plugins('machine')
for machine in machines:
print(f"Machine: {machine.name}")
# Get specific machine plugin
gemini_plugin = registry.get_plugin('machine', 'Gemini PR')
gemini_machine = gemini_plugin.obj
# List all GUI tools
tools = registry.list_plugins('gui.qt.tool')
for tool in tools:
print(f"Tool: {tool.name} - {tool.__doc__}")
# Register custom plugin
class CustomExtension:
def __init__(self, engine):
self.engine = engine
def start(self):
pass
def stop(self):
pass
registry.register_plugin('extension', 'my_extension', CustomExtension)
# List dictionary formats
dict_formats = registry.list_plugins('dictionary')
for fmt in dict_formats:
print(f"Dictionary format: {fmt.name}")
# Get meta command
attach_meta = registry.get_plugin('meta', 'attach')
attach_command = attach_meta.objPlugins are registered through Python entry points in setup.py or pyproject.toml:
# setup.py
entry_points={
'plover.machine': [
'My Machine = my_package.machine:MyMachine',
],
'plover.extension': [
'My Extension = my_package.extension:MyExtension',
],
'plover.dictionary': [
'My Format = my_package.dictionary:MyDictionary',
],
}The registry automatically discovers plugins through:
pkg_resources entry points for plugin typesEach plugin type has specific interface requirements:
StenotypeBaseStenoDictionary__init__(engine), start(), stop()Tool base classfrom typing import List, Dict, Any, Callable, Type, Union
PluginType = str
PluginName = str
PluginObject = Union[Type, Callable, object]
PluginTypesList = tuple[str, ...]
PluginsList = List[Plugin]
DistributionsList = List[Any]Install with Tessl CLI
npx tessl i tessl/pypi-plover