From 84d00d48b5a9fa98e9244d5ce535f1b4133db4c0 Mon Sep 17 00:00:00 2001 From: Denis Fomin Date: Wed, 5 Oct 2011 14:21:20 +0300 Subject: [PATCH] Add exec command plugin --- exec_command/__init__.py | 1 + exec_command/exec_command.py | 23 +++++++++++++++++++++++ exec_command/manifest.ini | 8 ++++++++ 3 files changed, 32 insertions(+) create mode 100644 exec_command/__init__.py create mode 100644 exec_command/exec_command.py create mode 100644 exec_command/manifest.ini diff --git a/exec_command/__init__.py b/exec_command/__init__.py new file mode 100644 index 0000000..b0b1f65 --- /dev/null +++ b/exec_command/__init__.py @@ -0,0 +1 @@ +from exec_command import ExecCommandPlugin diff --git a/exec_command/exec_command.py b/exec_command/exec_command.py new file mode 100644 index 0000000..c8e922b --- /dev/null +++ b/exec_command/exec_command.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- + +from plugins import GajimPlugin +from plugins.helpers import log_calls + +from common import gajim +from command_system.implementation.execute import * + +class ExecCommandPlugin(GajimPlugin): + + @log_calls('ExecCommandPlugin') + def init(self): + self.description = _('Add "show"("sh") command to command system. ' + 'Execute expression inside a shell, send output.') + self.config_dialog = None + + @log_calls('ExecCommandPlugin') + def activate(self): + Show.enable() + + @log_calls('ExecCommandPlugin') + def deactivate(self): + Show.disable() diff --git a/exec_command/manifest.ini b/exec_command/manifest.ini new file mode 100644 index 0000000..7641f08 --- /dev/null +++ b/exec_command/manifest.ini @@ -0,0 +1,8 @@ +[info] +name: Exec Command +short_name: exec_command +version: 0.1 +description: Add "show"("sh") command to command system. Execute expression inside a shell, send output. +authors = Denis Fomin +homepage = http://trac-plugins.gajim.org/wiki/ +