mirror of https://gitlab.com/bashrc2/epicyon
Check number of tags
parent
3fd0723684
commit
44d48edbc0
|
@ -622,7 +622,7 @@ def convertRSStoActivityPub(baseDir: str, httpPrefix: str,
|
||||||
}
|
}
|
||||||
blog['object']['tag'].append(newTag)
|
blog['object']['tag'].append(newTag)
|
||||||
hashtagHtml = \
|
hashtagHtml = \
|
||||||
"<a href=\"" + hashtagUrl + \
|
" <a href=\"" + hashtagUrl + \
|
||||||
"\" class=\"addedHashtag\" " + \
|
"\" class=\"addedHashtag\" " + \
|
||||||
"rel=\"tag\">#<span>" + \
|
"rel=\"tag\">#<span>" + \
|
||||||
htId + "</span></a>"
|
htId + "</span></a>"
|
||||||
|
|
11
newswire.py
11
newswire.py
|
@ -102,12 +102,13 @@ def addNewswireDictEntry(baseDir: str, domain: str,
|
||||||
postTags = getNewswireTags(allText, maxTags)
|
postTags = getNewswireTags(allText, maxTags)
|
||||||
|
|
||||||
# combine the tags into a single list
|
# combine the tags into a single list
|
||||||
for tag in postTags:
|
for tag in tags:
|
||||||
if tag not in tags:
|
if tag not in postTags:
|
||||||
tags.append(tag)
|
if len(postTags) < maxTags:
|
||||||
|
postTags.append(tag)
|
||||||
|
|
||||||
# check that no tags are blocked
|
# check that no tags are blocked
|
||||||
for tag in tags:
|
for tag in postTags:
|
||||||
if isBlockedHashtag(baseDir, tag.replace('#', '')):
|
if isBlockedHashtag(baseDir, tag.replace('#', '')):
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -118,7 +119,7 @@ def addNewswireDictEntry(baseDir: str, domain: str,
|
||||||
postFilename,
|
postFilename,
|
||||||
description,
|
description,
|
||||||
moderated,
|
moderated,
|
||||||
tags,
|
postTags,
|
||||||
mirrored
|
mirrored
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue