-
Notifications
You must be signed in to change notification settings - Fork 0
/
_bringme.txt
117 lines (111 loc) · 5.07 KB
/
_bringme.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
#
# This is a config file for Dragonfly's _multiedit.py command-module.
# To use this config, you must rename this file to _multiedit.txt and
# place it in the same directory as the _multiedit.py file.
#
# Pull in all of Dragonfly's action objects so that we can use them here.
from dragonfly import *
targets.mapping = {
"[my] favorite website": website("http://code.google.com/p/dragonfly"),
"my local folder": folder(r"C:\\"),
"vnc client": open(r"C:\Program Files (x86)\TightVNC\vncviewer.exe"),
"win SCP client": open(r"C:\Program Files (x86)\WinSCP3\WinSCP3.exe"),
#todo: sash entries
}
##---------------------------------------------------------------------------
## Here we define the single-action commands. These can be spoken
## in series so as to execute multiple actions within a single utterance.
#
#cmd.map = {
# # Spoken-form -> -> -> Action object
#
# "up [<n>]": Key("up:%(n)d"),
# "down [<n>]": Key("down:%(n)d"),
# "left [<n>]": Key("left:%(n)d"),
# "right [<n>]": Key("right:%(n)d"),
# "page up [<n>]": Key("pgup:%(n)d"),
# "page down [<n>]": Key("pgdown:%(n)d"),
# "up <n> (page | pages)": Key("pgup:%(n)d"),
# "down <n> (page | pages)": Key("pgdown:%(n)d"),
# "left <n> (word | words)": Key("c-left:%(n)d"),
# "right <n> (word | words)": Key("c-right:%(n)d"),
# "home": Key("home"),
# "end": Key("end"),
# "doc home": Key("c-home"),
# "doc end": Key("c-end"),
#
# "space [<n>]": release + Key("space:%(n)d"),
# "enter [<n>]": release + Key("enter:%(n)d"),
# "tab [<n>]": Key("tab:%(n)d"),
# "delete [<n>]": release + Key("del:%(n)d"),
# "delete [<n> | this] (line|lines)": release + Key("home, s-down:%(n)d, del"),
# "backspace [<n>]": release + Key("backspace:%(n)d"),
# "pop up": release + Key("apps"),
#
# "paste": release + Key("c-v"),
# "duplicate <n>": release + Key("c-c, c-v:%(n)d"),
# "copy": release + Key("c-c"),
# "cut": release + Key("c-x"),
# "select all": release + Key("c-a"),
# "[hold] shift": Key("shift:down"),
# "release shift": Key("shift:up"),
# "[hold] control": Key("ctrl:down"),
# "release control": Key("ctrl:up"),
# "release [all]": release,
#
# "say <text>": release + Text("%(text)s"),
# "mimic <text>": release + Mimic(extra="text"),
# }
#
#
##---------------------------------------------------------------------------
## Here we define various functions for formatting text.
## Each of these functions must have a docstring which defines its
## spoken-form. This docstring must include the "<dictation>" extra.
## See below for various examples.
#
## Format: some_words
#def format_score(dictation): # Function name must start with "format_".
# """ score <dictation> """ # Docstring defining spoken-form.
# text = str(dictation) # Get written-form of dictated text.
# return "_".join(text.split(" ")) # Put underscores between words.
#
## Format: some_words()
#def format_under_function(dictation):
# """ under func <dictation> """
# text = str(dictation)
# return "_".join(text.split(" ")) + "()"
#
## Format: SomeWords
#def format_studley(dictation):
# """ studley <dictation> """
# text = str(dictation)
# words = [word.capitalize() for word in text.split(" ")]
# return "".join(words)
#
## Format: somewords
#def format_one_word(dictation):
# """ [all] one word <dictation> """
# text = str(dictation)
# return "".join(text.split(" "))
#
## Format: SOMEWORDS
#def format_upper_one_word(dictation):
# """ one word upper <dictation> """
# text = str(dictation)
# words = [word.upper() for word in text.split(" ")]
# return "".join(words)
#
## Format: SOME_WORDS
#def format_upper_score(dictation):
# """ upper score <dictation> """
# text = str(dictation)
# words = [word.upper() for word in text.split(" ")]
# return "_".join(words)
#
## Format: someWords
#def format_java_method(dictation):
# """ Java method <dictation> """
# text = str(dictation)
# words = text.split(" ")
# return words[0] + "".join(w.capitalize() for w in words[1:])