make install executeable

This commit is contained in:
chrys 2016-10-30 00:27:07 +02:00
parent ad036e6c62
commit 2ec4102f8b
3 changed files with 10 additions and 5 deletions

0
install.sh Normal file → Executable file
View File

View File

@ -116,6 +116,7 @@ class driver():
self.env['screenData']['newNegativeDelta'] = ''
self.env['screenData']['newDelta'] = ''
self.env['screenData']['newAttribDelta'] = ''
# changes on the screen
oldScreenText = re.sub(' +',' ',self.env['runtime']['screenManager'].getWindowAreaInText(self.env['screenData']['oldContentText']))
newScreenText = re.sub(' +',' ',self.env['runtime']['screenManager'].getWindowAreaInText(self.env['screenData']['newContentText']))
@ -150,3 +151,7 @@ class driver():
self.env['screenData']['newDelta'] = ''.join(x[2:] for x in diffList if x[0] == '+')
self.env['screenData']['newNegativeDelta'] = ''.join(x[2:] for x in diffList if x[0] == '-')
# track highlighted
if self.env['screenData']['oldContentAttrib'] != self.env['screenData']['newContentAttrib']:
pass

View File

@ -10,24 +10,24 @@ from collections import Counter
def insertNewlines(string, every=64):
return '\n'.join(string[i:i+every] for i in range(0, len(string), every))
def splitAtrrLines(string, every=64):
def splitOnPos(string, every=64):
return list(string[i:i+every] for i in range(0, len(string), every))
old = b'eeeemmmeeeeeeeee'
new = b'eeeeeueeeeeeeeee'
text = 'das ist ein test'
def trackHighlights(oldAttr, newAttr, text):
def trackHighlights(oldAttr, newAttr, text, lenght):
result = ''
currCursor = None
if oldAttr == newAttr:
return result, currCursor
if len(newAttr) == 0:
return result, currCursor
textLines = insertNewlines(text,4)
textLines = insertNewlines(text,lenght)
textLines = textLines.split('\n')
old = splitAtrrLines(oldAttr,4)
new = splitAtrrLines(newAttr,4)
old = splitOnPos(oldAttr,lenght)
new = splitOnPos(newAttr,lenght)
if len(old) != len(new):
return result, currCursor
if len(text) != len(new):