From b86db9f1679c855c2d39a0b116f846d271271a2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Sun, 19 Jun 2016 21:31:54 +0200 Subject: Add pirate example config.yml + description --- helpers/__init__.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'helpers/__init__.py') 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): action_args[argument] = action[action_name][argument] key.add_action(action_name, **action_args) + + for key_property in config['key_properties']: + key = mapping.find_by_unicode(key_property) + if key is None: + continue + + if 'description' in config['key_properties'][key_property]: + key.set_description(config['key_properties'][key_property]['description']) + if 'color' in config['key_properties'][key_property]: + key.set_color(config['key_properties'][key_property]['color']) -- cgit v1.2.3