Utilidades¶
- ehforwarderbot.utils.extra(name, desc)[fuente]¶
Decorator for slave channel’s «additional features» interface.
- Parámetros
- Tipo del valor devuelto
- Devuelve
The decorated method.
Ejemplo
@extra(name="Echo", desc="Return the text entered.\n\nUsage:\n {function_name} text") def echo(self, text: str) -> Optional[str]: return text
- ehforwarderbot.utils.get_base_path()[fuente]¶
Get the base data path for EFB. This can be defined by the environment variable
EFB_DATA_PATH
.If
EFB_DATA_PATH
is not defined, this gives~/.ehforwarderbot
.This method creates the queried path if not existing.
- Tipo del valor devuelto
- Devuelve
The base path.
- ehforwarderbot.utils.get_config_path(module_id=None, ext='yaml')[fuente]¶
Get path for configuration file. Defaulted to
~/.ehforwarderbot/profiles/profile_name/module_id/config.yaml
.This method creates the queried path if not existing. The config file will not be created, however.
- ehforwarderbot.utils.get_custom_modules_path()[fuente]¶
Get the path to custom channels
- Tipo del valor devuelto
- Devuelve
The path for custom channels.