Update marked_text.py
This commit is contained in:
parent
ef6d6f6ba5
commit
f012418d62
@ -1,14 +1,21 @@
|
||||
#!/bin/python
|
||||
from utils import mark_utils
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def run(self, environment):
|
||||
if len(environment['commandBuffer']['clipboard']) == 0:
|
||||
environment['runtime']['outputManager'].presentText(environment, 'clipboard empty', interrupt=True)
|
||||
if (environment['commandBuffer']['Marks']['1'] == None) or \
|
||||
(environment['commandBuffer']['Marks']['2'] == None):
|
||||
environment['runtime']['outputManager'].presentText(environment, "two marks needed", interrupt=True)
|
||||
return environment
|
||||
environment['commandBuffer']['currClipboard'] = 0
|
||||
environment['runtime']['outputManager'].presentText(environment, environment['commandBuffer']['clipboard'][environment['commandBuffer']['currClipboard']], interrupt=True)
|
||||
|
||||
marked = mark_utils.getTextBetweenMarks(environment['commandBuffer']['Marks']['1'], environment['commandBuffer']['Marks']['2'], environment['screenData']['newContentText'])
|
||||
|
||||
if marked.strip(" \t\n") == '':
|
||||
environment['runtime']['outputManager'].presentText(environment, "blank", soundIcon='EmptyLine', interrupt=True)
|
||||
else:
|
||||
environment['runtime']['outputManager'].presentText(environment, marked, interrupt=True)
|
||||
return environment
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
Loading…
Reference in New Issue
Block a user