File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change
1
+ from talon import app , registry
2
+
3
+ required_captures = [
4
+ "number_small" ,
5
+ "user.any_alphanumeric_key" ,
6
+ "user.formatters" ,
7
+ "user.ordinals_small" ,
8
+ ]
9
+
10
+ required_actions = [
11
+ "user.homophones_get" ,
12
+ "user.reformat_text" ,
13
+ ]
14
+
15
+
16
+ def on_ready ():
17
+ missing_captures = [
18
+ capture for capture in required_captures if capture not in registry .captures
19
+ ]
20
+ missing_actions = [
21
+ action for action in required_actions if action not in registry .actions
22
+ ]
23
+ errors = []
24
+ if missing_captures :
25
+ errors .append (f"Missing captures: { ', ' .join (missing_captures )} " )
26
+ if missing_actions :
27
+ errors .append (f"Missing actions: { ', ' .join (missing_actions )} " )
28
+ if errors :
29
+ print ("\n " .join (errors ))
30
+ app .notify (
31
+ "Please install the community repository" ,
32
+ body = "https://github.com/talonhub/community" ,
33
+ )
34
+
35
+
36
+ app .register ("ready" , on_ready )
You can’t perform that action at this time.
0 commit comments