From 3339bf3bc7f145297f627d901c93333ba8c33065 Mon Sep 17 00:00:00 2001 From: Ian Markind Date: Mon, 27 Aug 2018 01:14:54 -0400 Subject: [PATCH] added commands for trello, and edited slack and standard commands --- slack.py | 2 +- std.py | 13 +++++++------ trello.py | 38 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+), 7 deletions(-) create mode 100644 trello.py diff --git a/slack.py b/slack.py index 72ecf05..fb78c3c 100644 --- a/slack.py +++ b/slack.py @@ -9,7 +9,7 @@ 'channel last': Key('alt-up'), '[channel] unread last': Key('alt-shift-up'), 'channel next': Key('alt-down'), - '[channel] unread [next]': Key('alt-shift-down'), + '[channel] unread next': Key('alt-shift-down'), '[channel] info': Key('cmd-shift-i'), # Navigation diff --git a/std.py b/std.py index 86d0239..487fa90 100644 --- a/std.py +++ b/std.py @@ -242,7 +242,8 @@ def FormatText(m): '(bang | exclamation point)': '!', 'dollar [sign]': '$', '(downscore | score)': '_', - '(dubscore | double downscore)': '__', + '(dubscore | double downscore | behm)': '__', + '(dubscore | double dash | behmdash)': '--', '(semi | semicolon)': ';', 'colon': ':', '(square | left square [bracket] | bracket)': '[', '(rsquare | are square | right square [bracket])': ']', @@ -331,8 +332,9 @@ def FormatText(m): 'index': ['[]', Key('left')], 'block': [' {}', Key('left enter enter up tab')], 'empty array': '[]', - 'empty dict': '{}', + 'empty dict | braces': '{}', + # python 'state (def | deaf | deft)': 'def ', 'state else if': 'elif ', 'state if': 'if ', @@ -352,10 +354,8 @@ def FormatText(m): 'state type deaf': 'typedef ', 'state type deaf struct': ['typedef struct {\n\n};', Key('up'), '\t'], - 'comment see': '// ', - 'comment py': '# ', - 'word queue': 'queue', + 'word none': 'None', 'word eye': 'eye', 'word bson': 'bson', 'word iter': 'iter', @@ -366,6 +366,7 @@ def FormatText(m): 'word printf': 'printf', 'word (dickt | dictionary)': 'dict', 'word shell': 'shell', + 'word to do': 'TODO', 'word lunixbochs': 'lunixbochs', 'word talon': 'talon', @@ -387,7 +388,7 @@ def FormatText(m): '(minus | dash)': '-', 'plus': '+', 'arrow': '->', - '(fat arrow | fatty)': '=>', + '(fat arrow | fatty)': ' => ', '(call | parens | parenthesis)': '()', 'indirect': '&', 'dereference': '*', diff --git a/trello.py b/trello.py new file mode 100644 index 0000000..9b9756e --- /dev/null +++ b/trello.py @@ -0,0 +1,38 @@ +from talon.voice import Context, Key + +ctx = Context('trello', bundle='com.atlassian.trello') + +keymap = { + '(quick add | add)': Key('ctrl-alt-space'), + 'boards': Key('b'), + 'search': Key('/'), + 'archive': Key('c'), + 'due date': Key('d'), + 'edit': Key('e'), + 'cancel': Key('esc'), + 'save': Key('cmd-enter'), + 'open card': Key('enter'), + 'create open': Key('shift-enter'), + 'filter': Key('f'), + 'toggle label': Key(';'), + '(add | remove) members': Key('m'), + 'new card': Key('n'), + 'move card left': Key(','), + 'move card right': Key('.'), + 'my cards': Key('q'), + '(watch | unwatch) card': Key('s'), + '(assign | unassign) me': Key('space'), + 'edit title': Key('t'), + 'vote': Key('v'), + '[| toggle] board menu': Key('w'), + 'clear filters': Key('x'), + 'shortcuts': Key('?'), + 'member': Key('@'), + 'tag label': Key('#'), + 'position': Key('^'), + + # TODO Add label color numbers (extended) + 'label': Key('l'), +} + +ctx.keymap(keymap) \ No newline at end of file