コード例 #1
0
ファイル: packagemanager.py プロジェクト: yufengzjj/idapkg
def install_package():
    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))
コード例 #2
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))
コード例 #3
0
def upgrade_package():
    actions = LocalPackage.all()
    actions = [
        (lambda _: Action(id=_.id,
                          name='%s %s' % (_.id, _.version),
                          handler=lambda action: _run_in_background(
                              lambda: _upgrade_package(action.id))))(item)
        for item in actions
    ]

    show_palette(Palette('remove', "Enter package name to remove...", actions))
コード例 #4
0
ファイル: packagemanager.py プロジェクト: mewbak/idapkg
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))
コード例 #5
0
def install_package():
    pkgs = get_online_packages()
    pkgs = [x for x in pkgs if LocalPackage.by_name(x.id) is None]
    actions = [
        (lambda _: Action(id=_.id,
                          name=_.name,
                          description=_.description,
                          handler=lambda action: _run_in_background(_.install))
         )(item) for item in pkgs
    ]
    show_palette(
        Palette('install', "Enter package name to install...", actions))