diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2016-06-19 21:31:54 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2016-06-19 21:31:54 +0200 |
commit | b86db9f1679c855c2d39a0b116f846d271271a2c (patch) | |
tree | 3795bc88bd0fafda718248541d14b2529a1bd406 /helpers/__init__.py | |
parent | ba9ea93a0f52178d24a606fddc2acc5dc85b7ff2 (diff) | |
download | MusicSampler-b86db9f1679c855c2d39a0b116f846d271271a2c.tar.gz MusicSampler-b86db9f1679c855c2d39a0b116f846d271271a2c.tar.zst MusicSampler-b86db9f1679c855c2d39a0b116f846d271271a2c.zip |
Add pirate example config.yml + description
Diffstat (limited to 'helpers/__init__.py')
-rw-r--r-- | helpers/__init__.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/helpers/__init__.py b/helpers/__init__.py index b1723ee..b7acbf5 100644 --- a/helpers/__init__.py +++ b/helpers/__init__.py | |||
@@ -47,3 +47,13 @@ def parse_config(mapping): | |||
47 | action_args[argument] = action[action_name][argument] | 47 | action_args[argument] = action[action_name][argument] |
48 | 48 | ||
49 | key.add_action(action_name, **action_args) | 49 | key.add_action(action_name, **action_args) |
50 | |||
51 | for key_property in config['key_properties']: | ||
52 | key = mapping.find_by_unicode(key_property) | ||
53 | if key is None: | ||
54 | continue | ||
55 | |||
56 | if 'description' in config['key_properties'][key_property]: | ||
57 | key.set_description(config['key_properties'][key_property]['description']) | ||
58 | if 'color' in config['key_properties'][key_property]: | ||
59 | key.set_color(config['key_properties'][key_property]['color']) | ||