mirror of https://gitlab.com/bashrc2/epicyon
Fix speakable return values
parent
20476173cc
commit
40655f8b19
|
@ -704,7 +704,7 @@ def _readLocalBoxPost(session, nickname: str, domain: str,
|
||||||
_textOnlyContent(postJsonObject2['object']['content'])
|
_textOnlyContent(postJsonObject2['object']['content'])
|
||||||
content += _getImageDescription(postJsonObject2)
|
content += _getImageDescription(postJsonObject2)
|
||||||
messageStr, detectedLinks = \
|
messageStr, detectedLinks = \
|
||||||
speakableText(baseDir, content, translate)[0]
|
speakableText(baseDir, content, translate)
|
||||||
sayStr = content
|
sayStr = content
|
||||||
_sayCommand(sayStr, messageStr, screenreader,
|
_sayCommand(sayStr, messageStr, screenreader,
|
||||||
systemLanguage, espeak)
|
systemLanguage, espeak)
|
||||||
|
@ -726,7 +726,7 @@ def _readLocalBoxPost(session, nickname: str, domain: str,
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
content = _safeMessage(content)
|
content = _safeMessage(content)
|
||||||
messageStr, detectedLinks = speakableText(baseDir, content, translate)[0]
|
messageStr, detectedLinks = speakableText(baseDir, content, translate)
|
||||||
|
|
||||||
if screenreader:
|
if screenreader:
|
||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
|
@ -770,7 +770,7 @@ def _desktopShowActor(baseDir: str, actorJson: {}, translate: {},
|
||||||
actorDomainFull = getFullDomain(actorDomain, actorPort)
|
actorDomainFull = getFullDomain(actorDomain, actorPort)
|
||||||
handle = '@' + actorNickname + '@' + actorDomainFull
|
handle = '@' + actorNickname + '@' + actorDomainFull
|
||||||
|
|
||||||
sayStr = html.unescape(handle)
|
sayStr = 'Profile for ' + html.unescape(handle)
|
||||||
_sayCommand(sayStr, sayStr, screenreader, systemLanguage, espeak)
|
_sayCommand(sayStr, sayStr, screenreader, systemLanguage, espeak)
|
||||||
print(actor)
|
print(actor)
|
||||||
if actorJson.get('movedTo'):
|
if actorJson.get('movedTo'):
|
||||||
|
@ -1080,10 +1080,6 @@ def _desktopShowBox(indent: str,
|
||||||
elif newReplies and boxName != 'tlreplies':
|
elif newReplies and boxName != 'tlreplies':
|
||||||
sayStr += \
|
sayStr += \
|
||||||
'Use \33[3mshow replies\33[0m to view reply posts.'
|
'Use \33[3mshow replies\33[0m to view reply posts.'
|
||||||
else:
|
|
||||||
sayStr += \
|
|
||||||
'Use the \33[3mnext\33[0m and ' + \
|
|
||||||
'\33[3mprev\33[0m commands to navigate.'
|
|
||||||
sayStr2 = sayStr.replace('\33[3m', '').replace('\33[0m', '')
|
sayStr2 = sayStr.replace('\33[3m', '').replace('\33[0m', '')
|
||||||
sayStr2 = sayStr2.replace('show dm', 'show DM')
|
sayStr2 = sayStr2.replace('show dm', 'show DM')
|
||||||
sayStr2 = sayStr2.replace('dm post', 'Direct message post')
|
sayStr2 = sayStr2.replace('dm post', 'Direct message post')
|
||||||
|
@ -2303,7 +2299,7 @@ def runDesktopClient(baseDir: str, proxyType: str, httpPrefix: str,
|
||||||
if postJsonObject:
|
if postJsonObject:
|
||||||
content = postJsonObject['object']['content']
|
content = postJsonObject['object']['content']
|
||||||
messageStr, detectedLinks = \
|
messageStr, detectedLinks = \
|
||||||
speakableText(baseDir, content, translate)[0]
|
speakableText(baseDir, content, translate)
|
||||||
linkOpened = False
|
linkOpened = False
|
||||||
for url in detectedLinks:
|
for url in detectedLinks:
|
||||||
if '://' in url:
|
if '://' in url:
|
||||||
|
|
|
@ -376,6 +376,7 @@ def speakableText(baseDir: str, content: str, translate: {}) -> (str, []):
|
||||||
"""Convert the given text to a speakable version
|
"""Convert the given text to a speakable version
|
||||||
which includes changes for prononciation
|
which includes changes for prononciation
|
||||||
"""
|
"""
|
||||||
|
content = str(content)
|
||||||
if isPGPEncrypted(content):
|
if isPGPEncrypted(content):
|
||||||
return content, []
|
return content, []
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue