mirror of
https://gitlab.com/bashrc2/epicyon
synced 2026-11-05 04:02:21 +00:00
Check number of tags
This commit is contained in:
1 parent
3fd0723684
commit
44d48edbc0
2 files changed
+7
-6
No files matched your search
+1
-1
@@ -622,7 +622,7 @@ def convertRSStoActivityPub(baseDir: str, httpPrefix: str,
|
||||
}
|
||||
blog['object']['tag'].append(newTag)
|
||||
hashtagHtml = \
|
||||
"<a href=\"" + hashtagUrl + \
|
||||
" <a href=\"" + hashtagUrl + \
|
||||
"\" class=\"addedHashtag\" " + \
|
||||
"rel=\"tag\">#<span>" + \
|
||||
htId + "</span></a>"
|
||||
|
||||
+6
-5
@@ -102,12 +102,13 @@ def addNewswireDictEntry(baseDir: str, domain: str,
|
||||
postTags = getNewswireTags(allText, maxTags)
|
||||
|
||||
# combine the tags into a single list
|
||||
for tag in postTags:
|
||||
if tag not in tags:
|
||||
tags.append(tag)
|
||||
for tag in tags:
|
||||
if tag not in postTags:
|
||||
if len(postTags) < maxTags:
|
||||
postTags.append(tag)
|
||||
|
||||
# check that no tags are blocked
|
||||
for tag in tags:
|
||||
for tag in postTags:
|
||||
if isBlockedHashtag(baseDir, tag.replace('#', '')):
|
||||
return
|
||||
|
||||
@@ -118,7 +119,7 @@ def addNewswireDictEntry(baseDir: str, domain: str,
|
||||
postFilename,
|
||||
description,
|
||||
moderated,
|
||||
tags,
|
||||
postTags,
|
||||
mirrored
|
||||
]
|
||||
|
||||
|
||||
Reference in new issue
Block a user