Move 'blind window' and 'min peaks' from FlatPeaksCommand to FlatFiltPlugin
[hooke.git] / hooke / plugin / cut.py
index f3c13c9914c0f4e2b407111149ae7dba02acfcc0..2771ef5bb4a574ebe37e26160349badcaaf62c98 100644 (file)
@@ -29,9 +29,7 @@ from ..plugin import Plugin
 class CutPlugin (Plugin):
     def __init__(self):
         super(CutPlugin, self).__init__(name='cut')
-
-    def commands(self):
-        return [CutCommand()]
+        self._commands = [CutCommand(self)]
 
 
 # Define common or complicated arguments
@@ -60,7 +58,7 @@ class CutCommand (Command):
     The data is saved in TAB-delimited ASCII text, where the first column
     is "x" and the second is "y".  There is no header row.
     """
-    def __init__(self):
+    def __init__(self, plugin):
         super(CutCommand, self).__init__(
             name='cut',
             arguments=[
@@ -79,7 +77,7 @@ Indicies of points bounding the selected data.
 File name for the output data.
 """.strip()),
                 ],
-            help=self.__doc__)
+            help=self.__doc__, plugin=plugin)
 
     def _run(self, hooke, inqueue, outqueue, params):
         if params['curve'] == None: