Extra debug

main2
Bob Mottram 2019-09-29 20:39:35 +01:00
parent cd30e547b8
commit f9760476ab
2 changed files with 7 additions and 0 deletions

View File

@ -461,6 +461,7 @@ def createPostBase(baseDir: str,nickname: str, domain: str, port: int, \
nickname,domain,content, \
mentionedRecipients, \
hashtagsDict)
print('Content tagging stage 1: '+content)
statusNumber,published = getStatusNumber()
postTo='https://www.w3.org/ns/activitystreams#Public'
@ -501,7 +502,9 @@ def createPostBase(baseDir: str,nickname: str, domain: str, port: int, \
tags.append(tag)
if isPublic:
updateHashtagsIndex(baseDir,tag,newPostId)
print('Content tags: '+str(tags))
content=replaceEmojiFromTags(content,tags,'content')
print('Content tagging stage 2: '+content)
if not clientToServer:
actorUrl=httpPrefix+'://'+domain+'/users/'+nickname

View File

@ -1599,18 +1599,22 @@ def addEmojiToDisplayName(baseDir: str,httpPrefix: str, \
if ':' in displayName:
displayName=displayName.replace('<p>','').replace('</p>','')
emojiTags={}
print('TAG: displayName before tags: '+displayName)
displayName= \
addHtmlTags(baseDir,httpPrefix, \
nickname,domain,displayName,[],emojiTags)
displayName=displayName.replace('<p>','').replace('</p>','')
print('TAG: displayName after tags: '+displayName)
# convert the emoji dictionary to a list
emojiTagsList=[]
for tagName,tag in emojiTags.items():
emojiTagsList.append(tag)
print('TAG: emoji tags list: '+str(emojiTagsList))
if not inProfileName:
displayName=replaceEmojiFromTags(displayName,emojiTagsList,'post header')
else:
displayName=replaceEmojiFromTags(displayName,emojiTagsList,'profile')
print('TAG: displayName after tag replacements: '+displayName)
return displayName
def individualPostAsHtml(iconsDir: str,translate: {}, \