Pulling in barcode magic from sample tracker and starting to update it to use ExtJS
[htsworkflow.git] / htsworkflow / frontend / bcmagic / plugin.py
1 #from htsworkflow.frontend.samples import bcm_cmds
2
3 #BCM_PLUGINS = {'cmd_move_sample': bcm_cmds.cmd_move_sample}
4
5
6 def bcm_plugin_processor(keyword, text, bcm_mode):
7     """
8     Fixme should be made generic plugable, but am hard coding values for proof
9     of concept.
10     """
11     d = {}
12     
13     if bcm_mode not in BCM_PLUGINS:
14         d['mode'] = 'Error'
15         d['status'] = 'bcm_mode plugin called "%s" was not found' % (bcm_mode)
16         return d
17     
18     return BCM_PLUGINS[bcm_mode](keyword, text, bcm_mode)