Exemplo n.º 1
0
 def __init__(self, *a, **kw):
     if len(a) == 2:
         kw['spec'], kw['static'] = a
     elif len(a) == 1:
         kw['spec'] = a[0]
     a = []
     proxy = aenea.proxy_actions.ProxyText(*a, **kw)
     local = dragonfly.Text(*a, **kw)
     AeneaDynStrActionBase.__init__(self,
                                    proxy,
                                    local,
                                    spec=kw.get('spec', None),
                                    static=kw.get('static', False))
Exemplo n.º 2
0
 def type(self, text):
     dragonfly.Text(text.replace("%", "%%")).execute()
Exemplo n.º 3
0
 def __init__(self, spec=None, static=False, pause=0.02, autofmt=False):
     DynamicAction.__init__(self,
                            dragonfly.Text(spec, static, pause, autofmt),
                            aenea.ProxyText(spec, static))
Exemplo n.º 4
0
 def build(self, call_info):
     spec = _get_single_anon_string(call_info.arguments, "Text action")
     return dragonfly.Text(spec)
Exemplo n.º 5
0
import dragonfly as fly
from _crall_dragonfly import Template
from _python_templates import func_tfmt, class_tfmt, listcomp_fmt

python_mapping = {
    'F. M. T.': fly.Text('fmt'),
    'P. Y.': fly.Text('py'),
    'N. P.': fly.Text('np'),
    'P. D.': fly.Text('pd'),
    'triple quote': fly.Text('\'\'\'') + fly.Key('enter') + fly.Text('\'\'\''),
    'is instance' : fly.Text('isinstance'),
    'U. tool' : fly.Text('utool'),
    'I. python' : fly.Text('ipython'),


    'from' : fly.Text('from '),
    'import' : fly.Text('import '),
    'lambda' : fly.Text('lambda '),
    'zip' : fly.Text('zip'),
    'map' : fly.Text('map'),

    #'import <mod>' : fly.Text('import /%(mod)s'),
    #'import <mod> as <alias>' : fly.Text('import /%(mod)s as /%(alias)s'),

    # common phrases

    'no Q. A.': fly.Text('  # NOQA'),

    # python structures

    'make def'    : Template(func_tfmt),
Exemplo n.º 6
0
def Template(fmt):
    return fly.Text(fmt)
Exemplo n.º 7
0
 def _function(dictation):
     formatted_text = function(dictation)
     fly.Text(formatted_text).execute()
Exemplo n.º 8
0
from _vimedit import vim_mapping

# Here we define the *default* command map.  If you would like to
#  modify it to your personal taste, please *do not* make changes
#  here.  Instead change the *config file* called '_multiedit.txt'.

# Spoken-form    ->    ->    ->     Action object

my_vocab = [
    'cache',
    'dir',
]

words = {
    #'hots': fly.Text('hots'),
    'ibeis | ibis': fly.Text('ibeis'),
    'vim': fly.Text('vim'),
    'G. vim': fly.Text('gvim'),
    'pandas': fly.Text('pandas'),
    'notebook': fly.Text('notebook'),
    #'esc | ask': fly.Text('esc'),
}

terminal = {
    'lips | L. S.': fly.Text('ls') + fly.Key('enter'),
}

_git = '(get | git)'
_git = 'git'
git = {
    _git + ' move': fly.Text('git move'),
Exemplo n.º 9
0
from _crall_dragonfly import esc  # NOQA
import dragonfly as fly
# https://pythonhosted.org/dragonfly/actions.html#refkeyspecnames
key_mapping = {
    'A. | a': fly.Key('a'),
    'B.': fly.Text('b'),
    'C.': fly.Text('c'),
    'I.': fly.Text('i'),
    'J.': fly.Text('j'),
    'K.': fly.Text('k'),
    'F.': fly.Text('f'),
    'O. | oh | o ': fly.Text('o'),
    'R. ': fly.Text('r'),
    'W. ': fly.Text('w'),
    'Q. ': fly.Text('q'),
    'X. ': fly.Text('x'),
}

symbol_mapping = {
    'pipe': fly.Text('|'),
    'plus': fly.Text('+'),
    'minus': fly.Text('-'),
    'score': fly.Text('_'),
    'equals': fly.Text('='),
    'care': fly.Text('^'),
    #conflict dot 'doll'              : fly.Text('$'),
    'star | asterisk': fly.Text('*'),
    'comma': fly.Text(','),
    'percent': fly.Text('%%'),
    'slash': fly.Text('/'),
    'backslash': fly.Text('\\'),