Pass newswire as parameter to timeline generator

main
Bob Mottram 2020-10-04 21:38:30 +01:00
parent a4469bd727
commit 3771d544da
2 changed files with 55 additions and 33 deletions

View File

@ -5902,7 +5902,8 @@ class PubServer(BaseHTTPRequestHandler):
httpPrefix,
projectVersion,
self._isMinimal(nickname),
YTReplacementDomain)
YTReplacementDomain,
self.server.newswire)
if GETstartTime:
self._benchmarkGETtimings(GETstartTime, GETtimings,
'show status done',
@ -6008,7 +6009,8 @@ class PubServer(BaseHTTPRequestHandler):
httpPrefix,
self.server.projectVersion,
self._isMinimal(nickname),
self.server.YTReplacementDomain)
self.server.YTReplacementDomain,
self.server.newswire)
msg = msg.encode('utf-8')
self._set_headers('text/html', len(msg),
cookie, callingDomain)
@ -6108,7 +6110,8 @@ class PubServer(BaseHTTPRequestHandler):
httpPrefix,
self.server.projectVersion,
self._isMinimal(nickname),
self.server.YTReplacementDomain)
self.server.YTReplacementDomain,
self.server.newswire)
msg = msg.encode('utf-8')
self._set_headers('text/html', len(msg),
cookie, callingDomain)
@ -6208,7 +6211,8 @@ class PubServer(BaseHTTPRequestHandler):
httpPrefix,
self.server.projectVersion,
self._isMinimal(nickname),
self.server.YTReplacementDomain)
self.server.YTReplacementDomain,
self.server.newswire)
msg = msg.encode('utf-8')
self._set_headers('text/html', len(msg),
cookie, callingDomain)
@ -6308,7 +6312,8 @@ class PubServer(BaseHTTPRequestHandler):
httpPrefix,
self.server.projectVersion,
self._isMinimal(nickname),
self.server.YTReplacementDomain)
self.server.YTReplacementDomain,
self.server.newswire)
msg = msg.encode('utf-8')
self._set_headers('text/html', len(msg),
cookie, callingDomain)
@ -6383,7 +6388,8 @@ class PubServer(BaseHTTPRequestHandler):
self.server.allowDeletion,
httpPrefix,
self.server.projectVersion,
self.server.YTReplacementDomain)
self.server.YTReplacementDomain,
self.server.newswire)
msg = msg.encode('utf-8')
self._set_headers('text/html', len(msg),
cookie, callingDomain)
@ -6467,7 +6473,8 @@ class PubServer(BaseHTTPRequestHandler):
httpPrefix,
self.server.projectVersion,
self._isMinimal(nickname),
self.server.YTReplacementDomain)
self.server.YTReplacementDomain,
self.server.newswire)
msg = msg.encode('utf-8')
self._set_headers('text/html', len(msg),
cookie, callingDomain)
@ -6570,7 +6577,8 @@ class PubServer(BaseHTTPRequestHandler):
httpPrefix,
self.server.projectVersion,
self._isMinimal(nickname),
self.server.YTReplacementDomain)
self.server.YTReplacementDomain,
self.server.newswire)
msg = msg.encode('utf-8')
self._set_headers('text/html', len(msg),
cookie, callingDomain)
@ -6663,7 +6671,8 @@ class PubServer(BaseHTTPRequestHandler):
httpPrefix,
self.server.projectVersion,
self._isMinimal(nickname),
self.server.YTReplacementDomain)
self.server.YTReplacementDomain,
self.server.newswire)
msg = msg.encode('utf-8')
self._set_headers('text/html', len(msg),
cookie, callingDomain)
@ -6748,7 +6757,8 @@ class PubServer(BaseHTTPRequestHandler):
True,
httpPrefix,
self.server.projectVersion,
self.server.YTReplacementDomain)
self.server.YTReplacementDomain,
self.server.newswire)
msg = msg.encode('utf-8')
self._set_headers('text/html', len(msg),
cookie, callingDomain)

View File

@ -5339,7 +5339,8 @@ def getLeftColumnContent(baseDir: str, nickname: str, domainFull: str,
def getRightColumnContent(baseDir: str, nickname: str, domainFull: str,
httpPrefix: str, translate: {},
iconsDir: str, moderator: bool) -> str:
iconsDir: str, moderator: bool,
newswire: {}) -> str:
"""Returns html content for the right column
"""
htmlStr = ''
@ -5413,7 +5414,8 @@ def htmlTimeline(defaultTimeline: str,
httpPrefix: str, projectVersion: str,
manuallyApproveFollowers: bool,
minimal: bool,
YTReplacementDomain: str) -> str:
YTReplacementDomain: str,
newswire: {}) -> str:
"""Show the timeline as html
"""
timelineStartTime = time.time()
@ -6021,7 +6023,7 @@ def htmlTimeline(defaultTimeline: str,
# right column
rightColumnStr = getRightColumnContent(baseDir, nickname, domainFull,
httpPrefix, translate, iconsDir,
moderator)
moderator, newswire)
tlStr += ' <td valign="top" class="col-right">' + \
rightColumnStr + ' </td>\n'
tlStr += ' </tr>\n'
@ -6062,7 +6064,8 @@ def htmlShares(defaultTimeline: str,
nickname: str, domain: str, port: int,
allowDeletion: bool,
httpPrefix: str, projectVersion: str,
YTReplacementDomain: str) -> str:
YTReplacementDomain: str,
newswire: {}) -> str:
"""Show the shares timeline as html
"""
manuallyApproveFollowers = \
@ -6074,7 +6077,7 @@ def htmlShares(defaultTimeline: str,
nickname, domain, port, None,
'tlshares', allowDeletion,
httpPrefix, projectVersion, manuallyApproveFollowers,
False, YTReplacementDomain)
False, YTReplacementDomain, newswire)
def htmlInbox(defaultTimeline: str,
@ -6084,7 +6087,8 @@ def htmlInbox(defaultTimeline: str,
nickname: str, domain: str, port: int, inboxJson: {},
allowDeletion: bool,
httpPrefix: str, projectVersion: str,
minimal: bool, YTReplacementDomain: str) -> str:
minimal: bool, YTReplacementDomain: str,
newswire: {}) -> str:
"""Show the inbox as html
"""
manuallyApproveFollowers = \
@ -6096,7 +6100,7 @@ def htmlInbox(defaultTimeline: str,
nickname, domain, port, inboxJson,
'inbox', allowDeletion,
httpPrefix, projectVersion, manuallyApproveFollowers,
minimal, YTReplacementDomain)
minimal, YTReplacementDomain, newswire)
def htmlBookmarks(defaultTimeline: str,
@ -6106,7 +6110,8 @@ def htmlBookmarks(defaultTimeline: str,
nickname: str, domain: str, port: int, bookmarksJson: {},
allowDeletion: bool,
httpPrefix: str, projectVersion: str,
minimal: bool, YTReplacementDomain: str) -> str:
minimal: bool, YTReplacementDomain: str,
newswire: {}) -> str:
"""Show the bookmarks as html
"""
manuallyApproveFollowers = \
@ -6118,7 +6123,7 @@ def htmlBookmarks(defaultTimeline: str,
nickname, domain, port, bookmarksJson,
'tlbookmarks', allowDeletion,
httpPrefix, projectVersion, manuallyApproveFollowers,
minimal, YTReplacementDomain)
minimal, YTReplacementDomain, newswire)
def htmlEvents(defaultTimeline: str,
@ -6128,7 +6133,8 @@ def htmlEvents(defaultTimeline: str,
nickname: str, domain: str, port: int, bookmarksJson: {},
allowDeletion: bool,
httpPrefix: str, projectVersion: str,
minimal: bool, YTReplacementDomain: str) -> str:
minimal: bool, YTReplacementDomain: str,
newswire: {}) -> str:
"""Show the events as html
"""
manuallyApproveFollowers = \
@ -6140,7 +6146,7 @@ def htmlEvents(defaultTimeline: str,
nickname, domain, port, bookmarksJson,
'tlevents', allowDeletion,
httpPrefix, projectVersion, manuallyApproveFollowers,
minimal, YTReplacementDomain)
minimal, YTReplacementDomain, newswire)
def htmlInboxDMs(defaultTimeline: str,
@ -6150,7 +6156,8 @@ def htmlInboxDMs(defaultTimeline: str,
nickname: str, domain: str, port: int, inboxJson: {},
allowDeletion: bool,
httpPrefix: str, projectVersion: str,
minimal: bool, YTReplacementDomain: str) -> str:
minimal: bool, YTReplacementDomain: str,
newswire: {}) -> str:
"""Show the DM timeline as html
"""
return htmlTimeline(defaultTimeline, recentPostsCache, maxRecentPosts,
@ -6158,7 +6165,7 @@ def htmlInboxDMs(defaultTimeline: str,
itemsPerPage, session, baseDir, wfRequest, personCache,
nickname, domain, port, inboxJson, 'dm', allowDeletion,
httpPrefix, projectVersion, False, minimal,
YTReplacementDomain)
YTReplacementDomain, newswire)
def htmlInboxReplies(defaultTimeline: str,
@ -6168,7 +6175,8 @@ def htmlInboxReplies(defaultTimeline: str,
nickname: str, domain: str, port: int, inboxJson: {},
allowDeletion: bool,
httpPrefix: str, projectVersion: str,
minimal: bool, YTReplacementDomain: str) -> str:
minimal: bool, YTReplacementDomain: str,
newswire: {}) -> str:
"""Show the replies timeline as html
"""
return htmlTimeline(defaultTimeline, recentPostsCache, maxRecentPosts,
@ -6176,7 +6184,7 @@ def htmlInboxReplies(defaultTimeline: str,
itemsPerPage, session, baseDir, wfRequest, personCache,
nickname, domain, port, inboxJson, 'tlreplies',
allowDeletion, httpPrefix, projectVersion, False,
minimal, YTReplacementDomain)
minimal, YTReplacementDomain, newswire)
def htmlInboxMedia(defaultTimeline: str,
@ -6186,7 +6194,8 @@ def htmlInboxMedia(defaultTimeline: str,
nickname: str, domain: str, port: int, inboxJson: {},
allowDeletion: bool,
httpPrefix: str, projectVersion: str,
minimal: bool, YTReplacementDomain: str) -> str:
minimal: bool, YTReplacementDomain: str,
newswire: {}) -> str:
"""Show the media timeline as html
"""
return htmlTimeline(defaultTimeline, recentPostsCache, maxRecentPosts,
@ -6194,7 +6203,7 @@ def htmlInboxMedia(defaultTimeline: str,
itemsPerPage, session, baseDir, wfRequest, personCache,
nickname, domain, port, inboxJson, 'tlmedia',
allowDeletion, httpPrefix, projectVersion, False,
minimal, YTReplacementDomain)
minimal, YTReplacementDomain, newswire)
def htmlInboxBlogs(defaultTimeline: str,
@ -6204,7 +6213,8 @@ def htmlInboxBlogs(defaultTimeline: str,
nickname: str, domain: str, port: int, inboxJson: {},
allowDeletion: bool,
httpPrefix: str, projectVersion: str,
minimal: bool, YTReplacementDomain: str) -> str:
minimal: bool, YTReplacementDomain: str,
newswire: {}) -> str:
"""Show the blogs timeline as html
"""
return htmlTimeline(defaultTimeline, recentPostsCache, maxRecentPosts,
@ -6212,7 +6222,7 @@ def htmlInboxBlogs(defaultTimeline: str,
itemsPerPage, session, baseDir, wfRequest, personCache,
nickname, domain, port, inboxJson, 'tlblogs',
allowDeletion, httpPrefix, projectVersion, False,
minimal, YTReplacementDomain)
minimal, YTReplacementDomain, newswire)
def htmlModeration(defaultTimeline: str,
@ -6222,7 +6232,8 @@ def htmlModeration(defaultTimeline: str,
nickname: str, domain: str, port: int, inboxJson: {},
allowDeletion: bool,
httpPrefix: str, projectVersion: str,
YTReplacementDomain: str) -> str:
YTReplacementDomain: str,
newswire: {}) -> str:
"""Show the moderation feed as html
"""
return htmlTimeline(defaultTimeline, recentPostsCache, maxRecentPosts,
@ -6230,7 +6241,7 @@ def htmlModeration(defaultTimeline: str,
itemsPerPage, session, baseDir, wfRequest, personCache,
nickname, domain, port, inboxJson, 'moderation',
allowDeletion, httpPrefix, projectVersion, True, False,
YTReplacementDomain)
YTReplacementDomain, newswire)
def htmlOutbox(defaultTimeline: str,
@ -6240,7 +6251,8 @@ def htmlOutbox(defaultTimeline: str,
nickname: str, domain: str, port: int, outboxJson: {},
allowDeletion: bool,
httpPrefix: str, projectVersion: str,
minimal: bool, YTReplacementDomain: str) -> str:
minimal: bool, YTReplacementDomain: str,
newswire: {}) -> str:
"""Show the Outbox as html
"""
manuallyApproveFollowers = \
@ -6251,7 +6263,7 @@ def htmlOutbox(defaultTimeline: str,
nickname, domain, port, outboxJson, 'outbox',
allowDeletion, httpPrefix, projectVersion,
manuallyApproveFollowers, minimal,
YTReplacementDomain)
YTReplacementDomain, newswire)
def htmlIndividualPost(recentPostsCache: {}, maxRecentPosts: int,