# Metas¶

To define a meta called example_meta, add the name as an entry point:

[options.entry_points]
plover.meta =
example_meta = plover_my_plugin.meta:example


The meta can be used in dictionary entries:

{
"S-": "{:example_meta:argument}",
"T-": "{:example_meta}"
}


Metas are implemented as functions that take a formatting._Context and an optional string argument. If an argument is not passed in the dictionary entry, it will be ''. The meta function returns a formatting._Action which will then be applied to the existing output.

You will want to use either context.new_action() or context.copy_last_action() as the basis for the output value. Previously translated text can also be accessed.

# plover_my_plugin/meta.py

def example(ctx, argument):
pass