mirror of https://gitlab.com/bashrc2/epicyon
Positive or negative voting on newswire items
parent
321aea4f89
commit
f3432d96f7
41
daemon.py
41
daemon.py
|
@ -4721,7 +4721,6 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
if 'vote:' + nickname not in newswire[dateStr][2]:
|
if 'vote:' + nickname not in newswire[dateStr][2]:
|
||||||
newswire[dateStr][2].append('vote:' + nickname)
|
newswire[dateStr][2].append('vote:' + nickname)
|
||||||
filename = newswire[dateStr][3]
|
filename = newswire[dateStr][3]
|
||||||
print('VOTE filename ' + str(filename))
|
|
||||||
if filename:
|
if filename:
|
||||||
saveJson(newswire[dateStr][2],
|
saveJson(newswire[dateStr][2],
|
||||||
filename + '.votes')
|
filename + '.votes')
|
||||||
|
@ -6043,7 +6042,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
projectVersion,
|
projectVersion,
|
||||||
self._isMinimal(nickname),
|
self._isMinimal(nickname),
|
||||||
YTReplacementDomain,
|
YTReplacementDomain,
|
||||||
self.server.newswire)
|
self.server.newswire,
|
||||||
|
self.server.positiveVoting)
|
||||||
if GETstartTime:
|
if GETstartTime:
|
||||||
self._benchmarkGETtimings(GETstartTime, GETtimings,
|
self._benchmarkGETtimings(GETstartTime, GETtimings,
|
||||||
'show status done',
|
'show status done',
|
||||||
|
@ -6150,7 +6150,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.projectVersion,
|
self.server.projectVersion,
|
||||||
self._isMinimal(nickname),
|
self._isMinimal(nickname),
|
||||||
self.server.YTReplacementDomain,
|
self.server.YTReplacementDomain,
|
||||||
self.server.newswire)
|
self.server.newswire,
|
||||||
|
self.server.positiveVoting)
|
||||||
msg = msg.encode('utf-8')
|
msg = msg.encode('utf-8')
|
||||||
self._set_headers('text/html', len(msg),
|
self._set_headers('text/html', len(msg),
|
||||||
cookie, callingDomain)
|
cookie, callingDomain)
|
||||||
|
@ -6251,7 +6252,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.projectVersion,
|
self.server.projectVersion,
|
||||||
self._isMinimal(nickname),
|
self._isMinimal(nickname),
|
||||||
self.server.YTReplacementDomain,
|
self.server.YTReplacementDomain,
|
||||||
self.server.newswire)
|
self.server.newswire,
|
||||||
|
self.server.positiveVoting)
|
||||||
msg = msg.encode('utf-8')
|
msg = msg.encode('utf-8')
|
||||||
self._set_headers('text/html', len(msg),
|
self._set_headers('text/html', len(msg),
|
||||||
cookie, callingDomain)
|
cookie, callingDomain)
|
||||||
|
@ -6352,7 +6354,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.projectVersion,
|
self.server.projectVersion,
|
||||||
self._isMinimal(nickname),
|
self._isMinimal(nickname),
|
||||||
self.server.YTReplacementDomain,
|
self.server.YTReplacementDomain,
|
||||||
self.server.newswire)
|
self.server.newswire,
|
||||||
|
self.server.positiveVoting)
|
||||||
msg = msg.encode('utf-8')
|
msg = msg.encode('utf-8')
|
||||||
self._set_headers('text/html', len(msg),
|
self._set_headers('text/html', len(msg),
|
||||||
cookie, callingDomain)
|
cookie, callingDomain)
|
||||||
|
@ -6453,7 +6456,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.projectVersion,
|
self.server.projectVersion,
|
||||||
self._isMinimal(nickname),
|
self._isMinimal(nickname),
|
||||||
self.server.YTReplacementDomain,
|
self.server.YTReplacementDomain,
|
||||||
self.server.newswire)
|
self.server.newswire,
|
||||||
|
self.server.positiveVoting)
|
||||||
msg = msg.encode('utf-8')
|
msg = msg.encode('utf-8')
|
||||||
self._set_headers('text/html', len(msg),
|
self._set_headers('text/html', len(msg),
|
||||||
cookie, callingDomain)
|
cookie, callingDomain)
|
||||||
|
@ -6560,7 +6564,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.projectVersion,
|
self.server.projectVersion,
|
||||||
self._isMinimal(nickname),
|
self._isMinimal(nickname),
|
||||||
self.server.YTReplacementDomain,
|
self.server.YTReplacementDomain,
|
||||||
self.server.newswire, moderator)
|
self.server.newswire, moderator,
|
||||||
|
self.server.positiveVoting)
|
||||||
msg = msg.replace('/news/', '/' + currNickname + '/')
|
msg = msg.replace('/news/', '/' + currNickname + '/')
|
||||||
msg = msg.replace('/users/news"',
|
msg = msg.replace('/users/news"',
|
||||||
'/users/' + currNickname + '"')
|
'/users/' + currNickname + '"')
|
||||||
|
@ -6641,7 +6646,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
httpPrefix,
|
httpPrefix,
|
||||||
self.server.projectVersion,
|
self.server.projectVersion,
|
||||||
self.server.YTReplacementDomain,
|
self.server.YTReplacementDomain,
|
||||||
self.server.newswire)
|
self.server.newswire,
|
||||||
|
self.server.positiveVoting)
|
||||||
msg = msg.encode('utf-8')
|
msg = msg.encode('utf-8')
|
||||||
self._set_headers('text/html', len(msg),
|
self._set_headers('text/html', len(msg),
|
||||||
cookie, callingDomain)
|
cookie, callingDomain)
|
||||||
|
@ -6726,7 +6732,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.projectVersion,
|
self.server.projectVersion,
|
||||||
self._isMinimal(nickname),
|
self._isMinimal(nickname),
|
||||||
self.server.YTReplacementDomain,
|
self.server.YTReplacementDomain,
|
||||||
self.server.newswire)
|
self.server.newswire,
|
||||||
|
self.server.positiveVoting)
|
||||||
msg = msg.encode('utf-8')
|
msg = msg.encode('utf-8')
|
||||||
self._set_headers('text/html', len(msg),
|
self._set_headers('text/html', len(msg),
|
||||||
cookie, callingDomain)
|
cookie, callingDomain)
|
||||||
|
@ -6830,7 +6837,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.projectVersion,
|
self.server.projectVersion,
|
||||||
self._isMinimal(nickname),
|
self._isMinimal(nickname),
|
||||||
self.server.YTReplacementDomain,
|
self.server.YTReplacementDomain,
|
||||||
self.server.newswire)
|
self.server.newswire,
|
||||||
|
self.server.positiveVoting)
|
||||||
msg = msg.encode('utf-8')
|
msg = msg.encode('utf-8')
|
||||||
self._set_headers('text/html', len(msg),
|
self._set_headers('text/html', len(msg),
|
||||||
cookie, callingDomain)
|
cookie, callingDomain)
|
||||||
|
@ -6924,7 +6932,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.projectVersion,
|
self.server.projectVersion,
|
||||||
self._isMinimal(nickname),
|
self._isMinimal(nickname),
|
||||||
self.server.YTReplacementDomain,
|
self.server.YTReplacementDomain,
|
||||||
self.server.newswire)
|
self.server.newswire,
|
||||||
|
self.server.positiveVoting)
|
||||||
msg = msg.encode('utf-8')
|
msg = msg.encode('utf-8')
|
||||||
self._set_headers('text/html', len(msg),
|
self._set_headers('text/html', len(msg),
|
||||||
cookie, callingDomain)
|
cookie, callingDomain)
|
||||||
|
@ -7010,7 +7019,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
httpPrefix,
|
httpPrefix,
|
||||||
self.server.projectVersion,
|
self.server.projectVersion,
|
||||||
self.server.YTReplacementDomain,
|
self.server.YTReplacementDomain,
|
||||||
self.server.newswire)
|
self.server.newswire,
|
||||||
|
self.server.positiveVoting)
|
||||||
msg = msg.encode('utf-8')
|
msg = msg.encode('utf-8')
|
||||||
self._set_headers('text/html', len(msg),
|
self._set_headers('text/html', len(msg),
|
||||||
cookie, callingDomain)
|
cookie, callingDomain)
|
||||||
|
@ -11345,7 +11355,8 @@ def loadTokens(baseDir: str, tokensDict: {}, tokensLookup: {}) -> None:
|
||||||
tokensLookup[token] = nickname
|
tokensLookup[token] = nickname
|
||||||
|
|
||||||
|
|
||||||
def runDaemon(newsInstance: bool,
|
def runDaemon(positiveVoting: bool,
|
||||||
|
newsInstance: bool,
|
||||||
blogsInstance: bool,
|
blogsInstance: bool,
|
||||||
mediaInstance: bool,
|
mediaInstance: bool,
|
||||||
maxRecentPosts: int,
|
maxRecentPosts: int,
|
||||||
|
@ -11452,6 +11463,10 @@ def runDaemon(newsInstance: bool,
|
||||||
print('ERROR: no translations loaded from ' + translationsFile)
|
print('ERROR: no translations loaded from ' + translationsFile)
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
||||||
|
# on the newswire, whether moderators vote positively for items
|
||||||
|
# or against them (veto)
|
||||||
|
httpd.positiveVoting = positiveVoting
|
||||||
|
|
||||||
if registration == 'open':
|
if registration == 'open':
|
||||||
httpd.registration = True
|
httpd.registration = True
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -198,6 +198,10 @@ parser.add_argument("--blogsinstance", type=str2bool, nargs='?',
|
||||||
parser.add_argument("--newsinstance", type=str2bool, nargs='?',
|
parser.add_argument("--newsinstance", type=str2bool, nargs='?',
|
||||||
const=True, default=False,
|
const=True, default=False,
|
||||||
help="News Instance - favor news over microblogging")
|
help="News Instance - favor news over microblogging")
|
||||||
|
parser.add_argument("--positivevoting", type=str2bool, nargs='?',
|
||||||
|
const=True, default=False,
|
||||||
|
help="On newswire, whether moderators vote " +
|
||||||
|
"positively for or veto against items")
|
||||||
parser.add_argument("--debug", type=str2bool, nargs='?',
|
parser.add_argument("--debug", type=str2bool, nargs='?',
|
||||||
const=True, default=False,
|
const=True, default=False,
|
||||||
help="Show debug messages")
|
help="Show debug messages")
|
||||||
|
@ -1911,7 +1915,8 @@ if setTheme(baseDir, themeName):
|
||||||
print('Theme set to ' + themeName)
|
print('Theme set to ' + themeName)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
runDaemon(args.newsinstance,
|
runDaemon(args.positivevoting,
|
||||||
|
args.newsinstance,
|
||||||
args.blogsinstance, args.mediainstance,
|
args.blogsinstance, args.mediainstance,
|
||||||
args.maxRecentPosts,
|
args.maxRecentPosts,
|
||||||
not args.nosharedinbox,
|
not args.nosharedinbox,
|
||||||
|
|
6
tests.py
6
tests.py
|
@ -287,7 +287,7 @@ def createServerAlice(path: str, domain: str, port: int,
|
||||||
onionDomain = None
|
onionDomain = None
|
||||||
i2pDomain = None
|
i2pDomain = None
|
||||||
print('Server running: Alice')
|
print('Server running: Alice')
|
||||||
runDaemon(False, False, False,
|
runDaemon(False, False, False, False,
|
||||||
5, True, True, 'en', __version__,
|
5, True, True, 'en', __version__,
|
||||||
"instanceId", False, path, domain,
|
"instanceId", False, path, domain,
|
||||||
onionDomain, i2pDomain, None, port, port,
|
onionDomain, i2pDomain, None, port, port,
|
||||||
|
@ -350,7 +350,7 @@ def createServerBob(path: str, domain: str, port: int,
|
||||||
onionDomain = None
|
onionDomain = None
|
||||||
i2pDomain = None
|
i2pDomain = None
|
||||||
print('Server running: Bob')
|
print('Server running: Bob')
|
||||||
runDaemon(False, False, False,
|
runDaemon(False, False, False, False,
|
||||||
5, True, True, 'en', __version__,
|
5, True, True, 'en', __version__,
|
||||||
"instanceId", False, path, domain,
|
"instanceId", False, path, domain,
|
||||||
onionDomain, i2pDomain, None, port, port,
|
onionDomain, i2pDomain, None, port, port,
|
||||||
|
@ -387,7 +387,7 @@ def createServerEve(path: str, domain: str, port: int, federationList: [],
|
||||||
onionDomain = None
|
onionDomain = None
|
||||||
i2pDomain = None
|
i2pDomain = None
|
||||||
print('Server running: Eve')
|
print('Server running: Eve')
|
||||||
runDaemon(False, False, False,
|
runDaemon(False, False, False, False,
|
||||||
5, True, True, 'en', __version__,
|
5, True, True, 'en', __version__,
|
||||||
"instanceId", False, path, domain,
|
"instanceId", False, path, domain,
|
||||||
onionDomain, i2pDomain, None, port, port,
|
onionDomain, i2pDomain, None, port, port,
|
||||||
|
|
|
@ -5368,7 +5368,7 @@ def getLeftColumnContent(baseDir: str, nickname: str, domainFull: str,
|
||||||
|
|
||||||
|
|
||||||
def htmlNewswire(newswire: str, nickname: str, moderator: bool,
|
def htmlNewswire(newswire: str, nickname: str, moderator: bool,
|
||||||
translate: {}) -> str:
|
translate: {}, positiveVoting: bool) -> str:
|
||||||
"""Converts a newswire dict into html
|
"""Converts a newswire dict into html
|
||||||
"""
|
"""
|
||||||
htmlStr = ''
|
htmlStr = ''
|
||||||
|
@ -5408,8 +5408,15 @@ def htmlNewswire(newswire: str, nickname: str, moderator: bool,
|
||||||
for line in item[2]:
|
for line in item[2]:
|
||||||
if 'vote:' in line:
|
if 'vote:' in line:
|
||||||
totalVotes += 1
|
totalVotes += 1
|
||||||
|
# show a number of ticks or crosses for how many
|
||||||
|
# votes for or against
|
||||||
if totalVotes > 0:
|
if totalVotes > 0:
|
||||||
totalVotesStr = ' +' + str(totalVotes)
|
totalVotesStr = ' '
|
||||||
|
for v in range(totalVotes):
|
||||||
|
if positiveVoting:
|
||||||
|
totalVotesStr += '✓'
|
||||||
|
else:
|
||||||
|
totalVotesStr += '✗'
|
||||||
|
|
||||||
htmlStr += '<p class="newswireItem">' + \
|
htmlStr += '<p class="newswireItem">' + \
|
||||||
'<a href="' + item[1] + '">' + item[0] + '</a>' + \
|
'<a href="' + item[1] + '">' + item[0] + '</a>' + \
|
||||||
|
@ -5431,7 +5438,7 @@ def htmlNewswire(newswire: str, nickname: str, moderator: bool,
|
||||||
def getRightColumnContent(baseDir: str, nickname: str, domainFull: str,
|
def getRightColumnContent(baseDir: str, nickname: str, domainFull: str,
|
||||||
httpPrefix: str, translate: {},
|
httpPrefix: str, translate: {},
|
||||||
iconsDir: str, moderator: bool,
|
iconsDir: str, moderator: bool,
|
||||||
newswire: {}) -> str:
|
newswire: {}, positiveVoting: bool) -> str:
|
||||||
"""Returns html content for the right column
|
"""Returns html content for the right column
|
||||||
"""
|
"""
|
||||||
htmlStr = ''
|
htmlStr = ''
|
||||||
|
@ -5503,7 +5510,8 @@ def getRightColumnContent(baseDir: str, nickname: str, domainFull: str,
|
||||||
else:
|
else:
|
||||||
htmlStr += ' <br>\n'
|
htmlStr += ' <br>\n'
|
||||||
|
|
||||||
htmlStr += htmlNewswire(newswire, nickname, moderator, translate)
|
htmlStr += htmlNewswire(newswire, nickname, moderator, translate,
|
||||||
|
positiveVoting)
|
||||||
return htmlStr
|
return htmlStr
|
||||||
|
|
||||||
|
|
||||||
|
@ -5518,7 +5526,8 @@ def htmlTimeline(defaultTimeline: str,
|
||||||
manuallyApproveFollowers: bool,
|
manuallyApproveFollowers: bool,
|
||||||
minimal: bool,
|
minimal: bool,
|
||||||
YTReplacementDomain: str,
|
YTReplacementDomain: str,
|
||||||
newswire: {}, moderator: bool) -> str:
|
newswire: {}, moderator: bool,
|
||||||
|
positiveVoting: bool) -> str:
|
||||||
"""Show the timeline as html
|
"""Show the timeline as html
|
||||||
"""
|
"""
|
||||||
timelineStartTime = time.time()
|
timelineStartTime = time.time()
|
||||||
|
@ -6153,7 +6162,7 @@ def htmlTimeline(defaultTimeline: str,
|
||||||
# right column
|
# right column
|
||||||
rightColumnStr = getRightColumnContent(baseDir, nickname, domainFull,
|
rightColumnStr = getRightColumnContent(baseDir, nickname, domainFull,
|
||||||
httpPrefix, translate, iconsDir,
|
httpPrefix, translate, iconsDir,
|
||||||
moderator, newswire)
|
moderator, newswire, positiveVoting)
|
||||||
tlStr += ' <td valign="top" class="col-right">' + \
|
tlStr += ' <td valign="top" class="col-right">' + \
|
||||||
rightColumnStr + ' </td>\n'
|
rightColumnStr + ' </td>\n'
|
||||||
tlStr += ' </tr>\n'
|
tlStr += ' </tr>\n'
|
||||||
|
@ -6195,7 +6204,7 @@ def htmlShares(defaultTimeline: str,
|
||||||
allowDeletion: bool,
|
allowDeletion: bool,
|
||||||
httpPrefix: str, projectVersion: str,
|
httpPrefix: str, projectVersion: str,
|
||||||
YTReplacementDomain: str,
|
YTReplacementDomain: str,
|
||||||
newswire: {}) -> str:
|
newswire: {}, positiveVoting: bool) -> str:
|
||||||
"""Show the shares timeline as html
|
"""Show the shares timeline as html
|
||||||
"""
|
"""
|
||||||
manuallyApproveFollowers = \
|
manuallyApproveFollowers = \
|
||||||
|
@ -6207,7 +6216,8 @@ def htmlShares(defaultTimeline: str,
|
||||||
nickname, domain, port, None,
|
nickname, domain, port, None,
|
||||||
'tlshares', allowDeletion,
|
'tlshares', allowDeletion,
|
||||||
httpPrefix, projectVersion, manuallyApproveFollowers,
|
httpPrefix, projectVersion, manuallyApproveFollowers,
|
||||||
False, YTReplacementDomain, newswire, False)
|
False, YTReplacementDomain, newswire, False,
|
||||||
|
positiveVoting)
|
||||||
|
|
||||||
|
|
||||||
def htmlInbox(defaultTimeline: str,
|
def htmlInbox(defaultTimeline: str,
|
||||||
|
@ -6218,7 +6228,7 @@ def htmlInbox(defaultTimeline: str,
|
||||||
allowDeletion: bool,
|
allowDeletion: bool,
|
||||||
httpPrefix: str, projectVersion: str,
|
httpPrefix: str, projectVersion: str,
|
||||||
minimal: bool, YTReplacementDomain: str,
|
minimal: bool, YTReplacementDomain: str,
|
||||||
newswire: {}) -> str:
|
newswire: {}, positiveVoting: bool) -> str:
|
||||||
"""Show the inbox as html
|
"""Show the inbox as html
|
||||||
"""
|
"""
|
||||||
manuallyApproveFollowers = \
|
manuallyApproveFollowers = \
|
||||||
|
@ -6230,7 +6240,8 @@ def htmlInbox(defaultTimeline: str,
|
||||||
nickname, domain, port, inboxJson,
|
nickname, domain, port, inboxJson,
|
||||||
'inbox', allowDeletion,
|
'inbox', allowDeletion,
|
||||||
httpPrefix, projectVersion, manuallyApproveFollowers,
|
httpPrefix, projectVersion, manuallyApproveFollowers,
|
||||||
minimal, YTReplacementDomain, newswire, False)
|
minimal, YTReplacementDomain, newswire, False,
|
||||||
|
positiveVoting)
|
||||||
|
|
||||||
|
|
||||||
def htmlBookmarks(defaultTimeline: str,
|
def htmlBookmarks(defaultTimeline: str,
|
||||||
|
@ -6241,7 +6252,7 @@ def htmlBookmarks(defaultTimeline: str,
|
||||||
allowDeletion: bool,
|
allowDeletion: bool,
|
||||||
httpPrefix: str, projectVersion: str,
|
httpPrefix: str, projectVersion: str,
|
||||||
minimal: bool, YTReplacementDomain: str,
|
minimal: bool, YTReplacementDomain: str,
|
||||||
newswire: {}) -> str:
|
newswire: {}, positiveVoting: bool) -> str:
|
||||||
"""Show the bookmarks as html
|
"""Show the bookmarks as html
|
||||||
"""
|
"""
|
||||||
manuallyApproveFollowers = \
|
manuallyApproveFollowers = \
|
||||||
|
@ -6253,7 +6264,8 @@ def htmlBookmarks(defaultTimeline: str,
|
||||||
nickname, domain, port, bookmarksJson,
|
nickname, domain, port, bookmarksJson,
|
||||||
'tlbookmarks', allowDeletion,
|
'tlbookmarks', allowDeletion,
|
||||||
httpPrefix, projectVersion, manuallyApproveFollowers,
|
httpPrefix, projectVersion, manuallyApproveFollowers,
|
||||||
minimal, YTReplacementDomain, newswire, False)
|
minimal, YTReplacementDomain, newswire, False,
|
||||||
|
positiveVoting)
|
||||||
|
|
||||||
|
|
||||||
def htmlEvents(defaultTimeline: str,
|
def htmlEvents(defaultTimeline: str,
|
||||||
|
@ -6264,7 +6276,7 @@ def htmlEvents(defaultTimeline: str,
|
||||||
allowDeletion: bool,
|
allowDeletion: bool,
|
||||||
httpPrefix: str, projectVersion: str,
|
httpPrefix: str, projectVersion: str,
|
||||||
minimal: bool, YTReplacementDomain: str,
|
minimal: bool, YTReplacementDomain: str,
|
||||||
newswire: {}) -> str:
|
newswire: {}, positiveVoting: bool) -> str:
|
||||||
"""Show the events as html
|
"""Show the events as html
|
||||||
"""
|
"""
|
||||||
manuallyApproveFollowers = \
|
manuallyApproveFollowers = \
|
||||||
|
@ -6276,7 +6288,8 @@ def htmlEvents(defaultTimeline: str,
|
||||||
nickname, domain, port, bookmarksJson,
|
nickname, domain, port, bookmarksJson,
|
||||||
'tlevents', allowDeletion,
|
'tlevents', allowDeletion,
|
||||||
httpPrefix, projectVersion, manuallyApproveFollowers,
|
httpPrefix, projectVersion, manuallyApproveFollowers,
|
||||||
minimal, YTReplacementDomain, newswire, False)
|
minimal, YTReplacementDomain, newswire, False,
|
||||||
|
positiveVoting)
|
||||||
|
|
||||||
|
|
||||||
def htmlInboxDMs(defaultTimeline: str,
|
def htmlInboxDMs(defaultTimeline: str,
|
||||||
|
@ -6287,7 +6300,7 @@ def htmlInboxDMs(defaultTimeline: str,
|
||||||
allowDeletion: bool,
|
allowDeletion: bool,
|
||||||
httpPrefix: str, projectVersion: str,
|
httpPrefix: str, projectVersion: str,
|
||||||
minimal: bool, YTReplacementDomain: str,
|
minimal: bool, YTReplacementDomain: str,
|
||||||
newswire: {}) -> str:
|
newswire: {}, positiveVoting: bool) -> str:
|
||||||
"""Show the DM timeline as html
|
"""Show the DM timeline as html
|
||||||
"""
|
"""
|
||||||
return htmlTimeline(defaultTimeline, recentPostsCache, maxRecentPosts,
|
return htmlTimeline(defaultTimeline, recentPostsCache, maxRecentPosts,
|
||||||
|
@ -6295,7 +6308,7 @@ def htmlInboxDMs(defaultTimeline: str,
|
||||||
itemsPerPage, session, baseDir, wfRequest, personCache,
|
itemsPerPage, session, baseDir, wfRequest, personCache,
|
||||||
nickname, domain, port, inboxJson, 'dm', allowDeletion,
|
nickname, domain, port, inboxJson, 'dm', allowDeletion,
|
||||||
httpPrefix, projectVersion, False, minimal,
|
httpPrefix, projectVersion, False, minimal,
|
||||||
YTReplacementDomain, newswire, False)
|
YTReplacementDomain, newswire, False, positiveVoting)
|
||||||
|
|
||||||
|
|
||||||
def htmlInboxReplies(defaultTimeline: str,
|
def htmlInboxReplies(defaultTimeline: str,
|
||||||
|
@ -6306,7 +6319,7 @@ def htmlInboxReplies(defaultTimeline: str,
|
||||||
allowDeletion: bool,
|
allowDeletion: bool,
|
||||||
httpPrefix: str, projectVersion: str,
|
httpPrefix: str, projectVersion: str,
|
||||||
minimal: bool, YTReplacementDomain: str,
|
minimal: bool, YTReplacementDomain: str,
|
||||||
newswire: {}) -> str:
|
newswire: {}, positiveVoting: bool) -> str:
|
||||||
"""Show the replies timeline as html
|
"""Show the replies timeline as html
|
||||||
"""
|
"""
|
||||||
return htmlTimeline(defaultTimeline, recentPostsCache, maxRecentPosts,
|
return htmlTimeline(defaultTimeline, recentPostsCache, maxRecentPosts,
|
||||||
|
@ -6314,7 +6327,8 @@ def htmlInboxReplies(defaultTimeline: str,
|
||||||
itemsPerPage, session, baseDir, wfRequest, personCache,
|
itemsPerPage, session, baseDir, wfRequest, personCache,
|
||||||
nickname, domain, port, inboxJson, 'tlreplies',
|
nickname, domain, port, inboxJson, 'tlreplies',
|
||||||
allowDeletion, httpPrefix, projectVersion, False,
|
allowDeletion, httpPrefix, projectVersion, False,
|
||||||
minimal, YTReplacementDomain, newswire, False)
|
minimal, YTReplacementDomain, newswire, False,
|
||||||
|
positiveVoting)
|
||||||
|
|
||||||
|
|
||||||
def htmlInboxMedia(defaultTimeline: str,
|
def htmlInboxMedia(defaultTimeline: str,
|
||||||
|
@ -6325,7 +6339,7 @@ def htmlInboxMedia(defaultTimeline: str,
|
||||||
allowDeletion: bool,
|
allowDeletion: bool,
|
||||||
httpPrefix: str, projectVersion: str,
|
httpPrefix: str, projectVersion: str,
|
||||||
minimal: bool, YTReplacementDomain: str,
|
minimal: bool, YTReplacementDomain: str,
|
||||||
newswire: {}) -> str:
|
newswire: {}, positiveVoting: bool) -> str:
|
||||||
"""Show the media timeline as html
|
"""Show the media timeline as html
|
||||||
"""
|
"""
|
||||||
return htmlTimeline(defaultTimeline, recentPostsCache, maxRecentPosts,
|
return htmlTimeline(defaultTimeline, recentPostsCache, maxRecentPosts,
|
||||||
|
@ -6333,7 +6347,8 @@ def htmlInboxMedia(defaultTimeline: str,
|
||||||
itemsPerPage, session, baseDir, wfRequest, personCache,
|
itemsPerPage, session, baseDir, wfRequest, personCache,
|
||||||
nickname, domain, port, inboxJson, 'tlmedia',
|
nickname, domain, port, inboxJson, 'tlmedia',
|
||||||
allowDeletion, httpPrefix, projectVersion, False,
|
allowDeletion, httpPrefix, projectVersion, False,
|
||||||
minimal, YTReplacementDomain, newswire, False)
|
minimal, YTReplacementDomain, newswire, False,
|
||||||
|
positiveVoting)
|
||||||
|
|
||||||
|
|
||||||
def htmlInboxBlogs(defaultTimeline: str,
|
def htmlInboxBlogs(defaultTimeline: str,
|
||||||
|
@ -6344,7 +6359,7 @@ def htmlInboxBlogs(defaultTimeline: str,
|
||||||
allowDeletion: bool,
|
allowDeletion: bool,
|
||||||
httpPrefix: str, projectVersion: str,
|
httpPrefix: str, projectVersion: str,
|
||||||
minimal: bool, YTReplacementDomain: str,
|
minimal: bool, YTReplacementDomain: str,
|
||||||
newswire: {}) -> str:
|
newswire: {}, positiveVoting: bool) -> str:
|
||||||
"""Show the blogs timeline as html
|
"""Show the blogs timeline as html
|
||||||
"""
|
"""
|
||||||
return htmlTimeline(defaultTimeline, recentPostsCache, maxRecentPosts,
|
return htmlTimeline(defaultTimeline, recentPostsCache, maxRecentPosts,
|
||||||
|
@ -6352,7 +6367,8 @@ def htmlInboxBlogs(defaultTimeline: str,
|
||||||
itemsPerPage, session, baseDir, wfRequest, personCache,
|
itemsPerPage, session, baseDir, wfRequest, personCache,
|
||||||
nickname, domain, port, inboxJson, 'tlblogs',
|
nickname, domain, port, inboxJson, 'tlblogs',
|
||||||
allowDeletion, httpPrefix, projectVersion, False,
|
allowDeletion, httpPrefix, projectVersion, False,
|
||||||
minimal, YTReplacementDomain, newswire, False)
|
minimal, YTReplacementDomain, newswire, False,
|
||||||
|
positiveVoting)
|
||||||
|
|
||||||
|
|
||||||
def htmlInboxNews(defaultTimeline: str,
|
def htmlInboxNews(defaultTimeline: str,
|
||||||
|
@ -6363,7 +6379,8 @@ def htmlInboxNews(defaultTimeline: str,
|
||||||
allowDeletion: bool,
|
allowDeletion: bool,
|
||||||
httpPrefix: str, projectVersion: str,
|
httpPrefix: str, projectVersion: str,
|
||||||
minimal: bool, YTReplacementDomain: str,
|
minimal: bool, YTReplacementDomain: str,
|
||||||
newswire: {}, moderator: bool) -> str:
|
newswire: {}, moderator: bool,
|
||||||
|
positiveVoting: bool) -> str:
|
||||||
"""Show the news timeline as html
|
"""Show the news timeline as html
|
||||||
"""
|
"""
|
||||||
return htmlTimeline(defaultTimeline, recentPostsCache, maxRecentPosts,
|
return htmlTimeline(defaultTimeline, recentPostsCache, maxRecentPosts,
|
||||||
|
@ -6371,7 +6388,8 @@ def htmlInboxNews(defaultTimeline: str,
|
||||||
itemsPerPage, session, baseDir, wfRequest, personCache,
|
itemsPerPage, session, baseDir, wfRequest, personCache,
|
||||||
nickname, domain, port, inboxJson, 'tlnews',
|
nickname, domain, port, inboxJson, 'tlnews',
|
||||||
allowDeletion, httpPrefix, projectVersion, False,
|
allowDeletion, httpPrefix, projectVersion, False,
|
||||||
minimal, YTReplacementDomain, newswire, moderator)
|
minimal, YTReplacementDomain, newswire, moderator,
|
||||||
|
positiveVoting)
|
||||||
|
|
||||||
|
|
||||||
def htmlModeration(defaultTimeline: str,
|
def htmlModeration(defaultTimeline: str,
|
||||||
|
@ -6382,7 +6400,7 @@ def htmlModeration(defaultTimeline: str,
|
||||||
allowDeletion: bool,
|
allowDeletion: bool,
|
||||||
httpPrefix: str, projectVersion: str,
|
httpPrefix: str, projectVersion: str,
|
||||||
YTReplacementDomain: str,
|
YTReplacementDomain: str,
|
||||||
newswire: {}) -> str:
|
newswire: {}, positiveVoting: bool) -> str:
|
||||||
"""Show the moderation feed as html
|
"""Show the moderation feed as html
|
||||||
"""
|
"""
|
||||||
return htmlTimeline(defaultTimeline, recentPostsCache, maxRecentPosts,
|
return htmlTimeline(defaultTimeline, recentPostsCache, maxRecentPosts,
|
||||||
|
@ -6390,7 +6408,7 @@ def htmlModeration(defaultTimeline: str,
|
||||||
itemsPerPage, session, baseDir, wfRequest, personCache,
|
itemsPerPage, session, baseDir, wfRequest, personCache,
|
||||||
nickname, domain, port, inboxJson, 'moderation',
|
nickname, domain, port, inboxJson, 'moderation',
|
||||||
allowDeletion, httpPrefix, projectVersion, True, False,
|
allowDeletion, httpPrefix, projectVersion, True, False,
|
||||||
YTReplacementDomain, newswire, False)
|
YTReplacementDomain, newswire, False, positiveVoting)
|
||||||
|
|
||||||
|
|
||||||
def htmlOutbox(defaultTimeline: str,
|
def htmlOutbox(defaultTimeline: str,
|
||||||
|
@ -6401,7 +6419,7 @@ def htmlOutbox(defaultTimeline: str,
|
||||||
allowDeletion: bool,
|
allowDeletion: bool,
|
||||||
httpPrefix: str, projectVersion: str,
|
httpPrefix: str, projectVersion: str,
|
||||||
minimal: bool, YTReplacementDomain: str,
|
minimal: bool, YTReplacementDomain: str,
|
||||||
newswire: {}) -> str:
|
newswire: {}, positiveVoting: bool) -> str:
|
||||||
"""Show the Outbox as html
|
"""Show the Outbox as html
|
||||||
"""
|
"""
|
||||||
manuallyApproveFollowers = \
|
manuallyApproveFollowers = \
|
||||||
|
@ -6412,7 +6430,7 @@ def htmlOutbox(defaultTimeline: str,
|
||||||
nickname, domain, port, outboxJson, 'outbox',
|
nickname, domain, port, outboxJson, 'outbox',
|
||||||
allowDeletion, httpPrefix, projectVersion,
|
allowDeletion, httpPrefix, projectVersion,
|
||||||
manuallyApproveFollowers, minimal,
|
manuallyApproveFollowers, minimal,
|
||||||
YTReplacementDomain, newswire, False)
|
YTReplacementDomain, newswire, False, positiveVoting)
|
||||||
|
|
||||||
|
|
||||||
def htmlIndividualPost(recentPostsCache: {}, maxRecentPosts: int,
|
def htmlIndividualPost(recentPostsCache: {}, maxRecentPosts: int,
|
||||||
|
|
Loading…
Reference in New Issue