forked from indymedia/epicyon
Remove debug
parent
4937bf9d91
commit
ec6dea1c58
|
@ -105,7 +105,6 @@ def addMention(wordStr: str,httpPrefix: str,following: str,replaceMentions: {},r
|
||||||
if len(wordStr)<2:
|
if len(wordStr)<2:
|
||||||
return False
|
return False
|
||||||
possibleHandle=wordStr[1:]
|
possibleHandle=wordStr[1:]
|
||||||
print('Possible mention: '+possibleHandle)
|
|
||||||
# @nick
|
# @nick
|
||||||
if following and '@' not in possibleHandle:
|
if following and '@' not in possibleHandle:
|
||||||
# fall back to a best effort match against the following list
|
# fall back to a best effort match against the following list
|
||||||
|
@ -179,7 +178,6 @@ def addHtmlTags(baseDir: str,httpPrefix: str, \
|
||||||
wordStr=wordStr[1:]
|
wordStr=wordStr[1:]
|
||||||
newWords.append(wordStr)
|
newWords.append(wordStr)
|
||||||
words=newWords
|
words=newWords
|
||||||
print(str(words))
|
|
||||||
|
|
||||||
replaceMentions={}
|
replaceMentions={}
|
||||||
replaceHashTags={}
|
replaceHashTags={}
|
||||||
|
@ -221,7 +219,6 @@ def addHtmlTags(baseDir: str,httpPrefix: str, \
|
||||||
content=content.replace(wordStr,replaceStr)
|
content=content.replace(wordStr,replaceStr)
|
||||||
|
|
||||||
content=content.replace('\n','</p><p>')
|
content=content.replace('\n','</p><p>')
|
||||||
print('Tags extracted from post: '+str(hashtags))
|
|
||||||
return '<p>'+content+'</p>'
|
return '<p>'+content+'</p>'
|
||||||
|
|
||||||
def getMentionsFromHtml(htmlText: str,matchStr="<span class=\"h-card\"><a href=\"") -> []:
|
def getMentionsFromHtml(htmlText: str,matchStr="<span class=\"h-card\"><a href=\"") -> []:
|
||||||
|
|
2
posts.py
2
posts.py
|
@ -444,8 +444,6 @@ def createPostBase(baseDir: str,nickname: str, domain: str, port: int, \
|
||||||
nickname,domain,content, \
|
nickname,domain,content, \
|
||||||
mentionedRecipients, \
|
mentionedRecipients, \
|
||||||
hashtagsDict)
|
hashtagsDict)
|
||||||
|
|
||||||
print('Tags extracted from post content: '+str(hashtagsDict))
|
|
||||||
|
|
||||||
statusNumber,published = getStatusNumber()
|
statusNumber,published = getStatusNumber()
|
||||||
conversationDate=published.split('T')[0]
|
conversationDate=published.split('T')[0]
|
||||||
|
|
Loading…
Reference in New Issue