Exemplo n.º 1
0
def remove_plugins():
    actions = LocalPackage.all()
    actions = [
        (lambda _: Action(id=_.id,
                          name='%s %s' % (_.id, _.version),
                          handler=lambda action: __work(_.remove)))(item)
        for item in actions
    ]

    show_palette(Palette('remove', "Enter package name to remove...", actions))
Exemplo n.º 2
0
def install_plugins():
    actions = get_online_packages()
    actions = [
        (lambda _: Action(id=_.id,
                          name=_.name,
                          description=_.description,
                          handler=lambda action: __work(_.install)))(item)
        for item in actions
    ]
    __builtins__['actions'] = actions
    show_palette(
        Palette('install', "Enter package name to install...", actions))
Exemplo n.º 3
0
def enable_package():
    actions = LocalPackage.all(disabled=True)
    actions = [(lambda _: Action(id=_.id, name='%s %s' % (_.id, _.version),
                                 handler=lambda action: __work(lambda: _enable_package(action.id))))(item) for item in actions]

    show_palette(Palette('disable', "Enter package name to disable...", actions))