plugins.py


Plugins class

None

Plugins source
class Plugins:
    def __init__(self, markata: "Markata"):
        self.m = markata

    def __rich__(self) -> Panel:
        grid = Table.grid(expand=True)
        grid.add_row(f"[bright_blue]{len(self.m._pm.get_plugins())}[/] plugins")
        for plugin in self.m._pm.get_plugins():
            grid.add_row(
                "".join(
                    [
                        "[bright_black]",
                        ".".join(plugin.__name__.split(".")[:-1]),
                        ".[/]",
                        plugin.__name__.split(".")[-1],
                    ]
                )
            )
        return Panel(grid, title="plugins", border_style="gold1")

init method

None

init source
def __init__(self, markata: "Markata"):
        self.m = markata

rich method

None

rich source
def __rich__(self) -> Panel:
        grid = Table.grid(expand=True)
        grid.add_row(f"[bright_blue]{len(self.m._pm.get_plugins())}[/] plugins")
        for plugin in self.m._pm.get_plugins():
            grid.add_row(
                "".join(
                    [
                        "[bright_black]",
                        ".".join(plugin.__name__.split(".")[:-1]),
                        ".[/]",
                        plugin.__name__.split(".")[-1],
                    ]
                )
            )
        return Panel(grid, title="plugins", border_style="gold1")