mirror of https://gitlab.com/bashrc2/epicyon
Say re-tweets
parent
19e3b45c3f
commit
16cf56d87a
|
@ -45,6 +45,7 @@ def speakerPronounce(baseDir: str, sayText: str, translate: {}) -> str:
|
||||||
"Epicyon": "Epi-cyon",
|
"Epicyon": "Epi-cyon",
|
||||||
"espeak": "e-speak",
|
"espeak": "e-speak",
|
||||||
"clearnet": "clear-net",
|
"clearnet": "clear-net",
|
||||||
|
"RT @": "Re-Tweet ",
|
||||||
"#": translate["hashtag"],
|
"#": translate["hashtag"],
|
||||||
":)": translate["smile"],
|
":)": translate["smile"],
|
||||||
";)": translate["wink"],
|
";)": translate["wink"],
|
||||||
|
@ -89,11 +90,13 @@ def speakerReplaceLinks(sayText: str, translate: {},
|
||||||
replacements = {}
|
replacements = {}
|
||||||
wordsList = text.split(' ')
|
wordsList = text.split(' ')
|
||||||
linkedStr = translate['Linked']
|
linkedStr = translate['Linked']
|
||||||
|
prevWord = ''
|
||||||
for word in wordsList:
|
for word in wordsList:
|
||||||
# replace mentions
|
# replace mentions, but not re-tweets
|
||||||
if word.startswith('@'):
|
if word.startswith('@') and prevWord != 'RT':
|
||||||
replacements[word] = \
|
replacements[word] = \
|
||||||
translate['mentioning'] + ' ' + word[1:] + ','
|
translate['mentioning'] + ' ' + word[1:] + ','
|
||||||
|
prevWord = word
|
||||||
|
|
||||||
domain = None
|
domain = None
|
||||||
domainFull = None
|
domainFull = None
|
||||||
|
|
Loading…
Reference in New Issue