Option to only show date at bottom of posts, not time

merge-requests/8/head
Bob Mottram 2020-10-11 19:50:13 +01:00
parent 65f4e3ad41
commit 2899768828
6 changed files with 151 additions and 43 deletions

View File

@ -954,7 +954,8 @@ class PubServer(BaseHTTPRequestHandler):
self.server.allowDeletion,
self.server.proxyType, version,
self.server.debug,
self.server.YTReplacementDomain)
self.server.YTReplacementDomain,
self.server.showPublishedDateOnly)
def _postToOutboxThread(self, messageJson: {}) -> bool:
"""Creates a thread to send a post
@ -2253,7 +2254,8 @@ class PubServer(BaseHTTPRequestHandler):
self.server.personCache,
httpPrefix,
self.server.projectVersion,
self.server.YTReplacementDomain)
self.server.YTReplacementDomain,
self.server.showPublishedDateOnly)
if hashtagStr:
msg = hashtagStr.encode('utf-8')
self._login_headers('text/html',
@ -2298,7 +2300,8 @@ class PubServer(BaseHTTPRequestHandler):
self.server.cachedWebfingers,
self.server.personCache,
port,
self.server.YTReplacementDomain)
self.server.YTReplacementDomain,
self.server.showPublishedDateOnly)
if historyStr:
msg = historyStr.encode('utf-8')
self._login_headers('text/html',
@ -2341,7 +2344,8 @@ class PubServer(BaseHTTPRequestHandler):
self.server.personCache,
self.server.debug,
self.server.projectVersion,
self.server.YTReplacementDomain)
self.server.YTReplacementDomain,
self.server.showPublishedDateOnly)
if profileStr:
msg = profileStr.encode('utf-8')
self._login_headers('text/html',
@ -4542,7 +4546,8 @@ class PubServer(BaseHTTPRequestHandler):
self.server.personCache,
httpPrefix,
self.server.projectVersion,
self.server.YTReplacementDomain)
self.server.YTReplacementDomain,
self.server.showPublishedDateOnly)
if hashtagStr:
msg = hashtagStr.encode('utf-8')
self._set_headers('text/html', len(msg),
@ -5448,7 +5453,8 @@ class PubServer(BaseHTTPRequestHandler):
deleteUrl, httpPrefix,
__version__, self.server.cachedWebfingers,
self.server.personCache, callingDomain,
self.server.TYReplacementDomain)
self.server.YTReplacementDomain,
self.server.showPublishedDateOnly)
if deleteStr:
self._set_headers('text/html', len(deleteStr),
cookie, callingDomain)
@ -5647,7 +5653,8 @@ class PubServer(BaseHTTPRequestHandler):
repliesJson,
httpPrefix,
projectVersion,
ytDomain)
ytDomain,
self.server.showPublishedDateOnly)
msg = msg.encode('utf-8')
self._set_headers('text/html', len(msg),
cookie, callingDomain)
@ -5727,7 +5734,8 @@ class PubServer(BaseHTTPRequestHandler):
repliesJson,
httpPrefix,
projectVersion,
ytDomain)
ytDomain,
self.server.showPublishedDateOnly)
msg = msg.encode('utf-8')
self._set_headers('text/html', len(msg),
cookie, callingDomain)
@ -5802,6 +5810,7 @@ class PubServer(BaseHTTPRequestHandler):
cachedWebfingers,
self.server.personCache,
YTReplacementDomain,
self.server.showPublishedDateOnly,
actorJson['roles'],
None, None)
msg = msg.encode('utf-8')
@ -5860,6 +5869,8 @@ class PubServer(BaseHTTPRequestHandler):
self.server.cachedWebfingers
YTReplacementDomain = \
self.server.YTReplacementDomain
showPublishedDateOnly = \
self.server.showPublishedDateOnly
msg = \
htmlProfile(defaultTimeline,
recentPostsCache,
@ -5872,6 +5883,7 @@ class PubServer(BaseHTTPRequestHandler):
cachedWebfingers,
self.server.personCache,
YTReplacementDomain,
showPublishedDateOnly,
actorJson['skills'],
None, None)
msg = msg.encode('utf-8')
@ -5972,6 +5984,8 @@ class PubServer(BaseHTTPRequestHandler):
self.server.projectVersion
ytDomain = \
self.server.YTReplacementDomain
showPublishedDateOnly = \
self.server.showPublishedDateOnly
msg = \
htmlIndividualPost(recentPostsCache,
maxRecentPosts,
@ -5987,7 +6001,8 @@ class PubServer(BaseHTTPRequestHandler):
httpPrefix,
projectVersion,
likedBy,
ytDomain)
ytDomain,
showPublishedDateOnly)
msg = msg.encode('utf-8')
self._set_headers('text/html', len(msg),
cookie, callingDomain)
@ -6079,6 +6094,8 @@ class PubServer(BaseHTTPRequestHandler):
self.server.projectVersion
ytDomain = \
self.server.YTReplacementDomain
showPublishedDateOnly = \
self.server.showPublishedDateOnly
msg = \
htmlIndividualPost(recentPostsCache,
maxRecentPosts,
@ -6095,7 +6112,8 @@ class PubServer(BaseHTTPRequestHandler):
httpPrefix,
projectVersion,
likedBy,
ytDomain)
ytDomain,
showPublishedDateOnly)
msg = msg.encode('utf-8')
self._set_headers('text/html', len(msg),
cookie, callingDomain)
@ -6212,6 +6230,7 @@ class PubServer(BaseHTTPRequestHandler):
projectVersion,
self._isMinimal(nickname),
YTReplacementDomain,
self.server.showPublishedDateOnly,
self.server.newswire,
self.server.positiveVoting)
if GETstartTime:
@ -6325,6 +6344,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.projectVersion,
self._isMinimal(nickname),
self.server.YTReplacementDomain,
self.server.showPublishedDateOnly,
self.server.newswire,
self.server.positiveVoting)
msg = msg.encode('utf-8')
@ -6431,6 +6451,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.projectVersion,
self._isMinimal(nickname),
self.server.YTReplacementDomain,
self.server.showPublishedDateOnly,
self.server.newswire,
self.server.positiveVoting)
msg = msg.encode('utf-8')
@ -6537,6 +6558,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.projectVersion,
self._isMinimal(nickname),
self.server.YTReplacementDomain,
self.server.showPublishedDateOnly,
self.server.newswire,
self.server.positiveVoting)
msg = msg.encode('utf-8')
@ -6643,6 +6665,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.projectVersion,
self._isMinimal(nickname),
self.server.YTReplacementDomain,
self.server.showPublishedDateOnly,
self.server.newswire,
self.server.positiveVoting)
msg = msg.encode('utf-8')
@ -6756,6 +6779,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.projectVersion,
self._isMinimal(nickname),
self.server.YTReplacementDomain,
self.server.showPublishedDateOnly,
self.server.newswire, moderator,
self.server.positiveVoting)
msg = msg.encode('utf-8')
@ -6832,6 +6856,7 @@ class PubServer(BaseHTTPRequestHandler):
httpPrefix,
self.server.projectVersion,
self.server.YTReplacementDomain,
self.server.showPublishedDateOnly,
self.server.newswire,
self.server.positiveVoting)
msg = msg.encode('utf-8')
@ -6922,6 +6947,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.projectVersion,
self._isMinimal(nickname),
self.server.YTReplacementDomain,
self.server.showPublishedDateOnly,
self.server.newswire,
self.server.positiveVoting)
msg = msg.encode('utf-8')
@ -7031,6 +7057,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.projectVersion,
self._isMinimal(nickname),
self.server.YTReplacementDomain,
self.server.showPublishedDateOnly,
self.server.newswire,
self.server.positiveVoting)
msg = msg.encode('utf-8')
@ -7132,6 +7159,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.projectVersion,
self._isMinimal(nickname),
self.server.YTReplacementDomain,
self.server.showPublishedDateOnly,
self.server.newswire,
self.server.positiveVoting)
msg = msg.encode('utf-8')
@ -7223,6 +7251,7 @@ class PubServer(BaseHTTPRequestHandler):
httpPrefix,
self.server.projectVersion,
self.server.YTReplacementDomain,
self.server.showPublishedDateOnly,
self.server.newswire,
self.server.positiveVoting)
msg = msg.encode('utf-8')
@ -7314,6 +7343,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.cachedWebfingers,
self.server.personCache,
self.server.YTReplacementDomain,
self.server.showPublishedDateOnly,
shares,
pageNumber, sharesPerPage)
msg = msg.encode('utf-8')
@ -7400,6 +7430,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.cachedWebfingers,
self.server.personCache,
self.server.YTReplacementDomain,
self.server.showPublishedDateOnly,
following,
pageNumber,
followsPerPage).encode('utf-8')
@ -7486,6 +7517,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.cachedWebfingers,
self.server.personCache,
self.server.YTReplacementDomain,
self.server.showPublishedDateOnly,
followers,
pageNumber,
followsPerPage).encode('utf-8')
@ -7547,6 +7579,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.cachedWebfingers,
self.server.personCache,
self.server.YTReplacementDomain,
self.server.showPublishedDateOnly,
None, None).encode('utf-8')
self._set_headers('text/html', len(msg),
cookie, callingDomain)
@ -11610,7 +11643,8 @@ def loadTokens(baseDir: str, tokensDict: {}, tokensLookup: {}) -> None:
tokensLookup[token] = nickname
def runDaemon(votingTimeMins: int,
def runDaemon(showPublishedDateOnly: bool,
votingTimeMins: int,
positiveVoting: bool,
newswireVotesThreshold: int,
newsInstance: bool,
@ -11730,6 +11764,9 @@ def runDaemon(votingTimeMins: int,
# or if positive voting is anabled to add the item to the news timeline
httpd.newswireVotesThreshold = newswireVotesThreshold
# Show only the date at the bottom of posts, and not the time
httpd.showPublishedDateOnly = showPublishedDateOnly
if registration == 'open':
httpd.registration = True
else:
@ -11860,7 +11897,8 @@ def runDaemon(votingTimeMins: int,
domainMaxPostsPerDay, accountMaxPostsPerDay,
allowDeletion, debug, maxMentions, maxEmoji,
httpd.translate, unitTest,
httpd.YTReplacementDomain), daemon=True)
httpd.YTReplacementDomain,
httpd.showPublishedDateOnly), daemon=True)
print('Creating scheduled post thread')
httpd.thrPostSchedule = \

View File

@ -192,6 +192,9 @@ parser.add_argument("--noapproval", type=str2bool, nargs='?',
parser.add_argument("--mediainstance", type=str2bool, nargs='?',
const=True, default=False,
help="Media Instance - favor media over text")
parser.add_argument("--dateonly", type=str2bool, nargs='?',
const=True, default=False,
help="Only show the date at the bottom of posts")
parser.add_argument("--blogsinstance", type=str2bool, nargs='?',
const=True, default=False,
help="Blogs Instance - favor blogs over microblogging")
@ -1917,6 +1920,11 @@ votingtime = getConfigParam(baseDir, 'votingtime')
if votingtime:
args.votingtime = votingtime
# only show the date at the bottom of posts
dateonly = getConfigParam(baseDir, 'dateonly')
if dateonly:
args.dateonly = dateonly
YTDomain = getConfigParam(baseDir, 'youtubedomain')
if YTDomain:
if '://' in YTDomain:
@ -1930,7 +1938,8 @@ if setTheme(baseDir, themeName, domain):
print('Theme set to ' + themeName)
if __name__ == "__main__":
runDaemon(args.votingtime,
runDaemon(args.dateonly,
args.votingtime,
args.positivevoting,
args.minimumvotes,
args.newsinstance,

View File

@ -129,7 +129,8 @@ def inboxStorePostToHtmlCache(recentPostsCache: {}, maxRecentPosts: int,
session, cachedWebfingers: {}, personCache: {},
nickname: str, domain: str, port: int,
postJsonObject: {},
allowDeletion: bool, boxname: str) -> None:
allowDeletion: bool, boxname: str,
showPublishedDateOnly: bool) -> None:
"""Converts the json post into html and stores it in a cache
This enables the post to be quickly displayed later
"""
@ -142,7 +143,8 @@ def inboxStorePostToHtmlCache(recentPostsCache: {}, maxRecentPosts: int,
baseDir, session, cachedWebfingers, personCache,
nickname, domain, port, postJsonObject,
avatarUrl, True, allowDeletion,
httpPrefix, __version__, boxname,
httpPrefix, __version__, boxname, None,
showPublishedDateOnly,
not isDM(postJsonObject),
True, True, False, True)
@ -2027,7 +2029,8 @@ def inboxAfterInitial(recentPostsCache: {}, maxRecentPosts: int,
queueFilename: str, destinationFilename: str,
maxReplies: int, allowDeletion: bool,
maxMentions: int, maxEmoji: int, translate: {},
unitTest: bool, YTReplacementDomain: str) -> bool:
unitTest: bool, YTReplacementDomain: str,
showPublishedDateOnly: bool) -> bool:
""" Anything which needs to be done after initial checks have passed
"""
actor = keyId
@ -2337,7 +2340,8 @@ def inboxAfterInitial(recentPostsCache: {}, maxRecentPosts: int,
domain, port,
postJsonObject,
allowDeletion,
boxname)
boxname,
showPublishedDateOnly)
if debug:
timeDiff = \
str(int((time.time() - htmlCacheStartTime) *
@ -2431,7 +2435,8 @@ def runInboxQueue(recentPostsCache: {}, maxRecentPosts: int,
domainMaxPostsPerDay: int, accountMaxPostsPerDay: int,
allowDeletion: bool, debug: bool, maxMentions: int,
maxEmoji: int, translate: {}, unitTest: bool,
YTReplacementDomain: str) -> None:
YTReplacementDomain: str,
showPublishedDateOnly: bool) -> None:
"""Processes received items and moves them to the appropriate
directories
"""
@ -2843,7 +2848,8 @@ def runInboxQueue(recentPostsCache: {}, maxRecentPosts: int,
maxReplies, allowDeletion,
maxMentions, maxEmoji,
translate, unitTest,
YTReplacementDomain)
YTReplacementDomain,
showPublishedDateOnly)
if debug:
pprint(queueJson['post'])

View File

@ -45,7 +45,8 @@ def postMessageToOutbox(messageJson: {}, postToNickname: str,
postLog: [], cachedWebfingers: {},
personCache: {}, allowDeletion: bool,
proxyType: str, version: str, debug: bool,
YTReplacementDomain: str) -> bool:
YTReplacementDomain: str,
showPublishedDateOnly: bool) -> bool:
"""post is received by the outbox
Client to server message post
https://www.w3.org/TR/activitypub/#client-to-server-outbox-delivery

View File

@ -288,7 +288,7 @@ def createServerAlice(path: str, domain: str, port: int,
onionDomain = None
i2pDomain = None
print('Server running: Alice')
runDaemon(0, False, 1, False, False, False,
runDaemon(False, 0, False, 1, False, False, False,
5, True, True, 'en', __version__,
"instanceId", False, path, domain,
onionDomain, i2pDomain, None, port, port,
@ -351,7 +351,7 @@ def createServerBob(path: str, domain: str, port: int,
onionDomain = None
i2pDomain = None
print('Server running: Bob')
runDaemon(0, False, 1, False, False, False,
runDaemon(False, 0, False, 1, False, False, False,
5, True, True, 'en', __version__,
"instanceId", False, path, domain,
onionDomain, i2pDomain, None, port, port,
@ -388,7 +388,7 @@ def createServerEve(path: str, domain: str, port: int, federationList: [],
onionDomain = None
i2pDomain = None
print('Server running: Eve')
runDaemon(0, False, 1, False, False, False,
runDaemon(False, 0, False, 1, False, False, False,
5, True, True, 'en', __version__,
"instanceId", False, path, domain,
onionDomain, i2pDomain, None, port, port,

View File

@ -710,7 +710,8 @@ def htmlHashtagSearch(nickname: str, domain: str, port: int,
postsPerPage: int,
session, wfRequest: {}, personCache: {},
httpPrefix: str, projectVersion: str,
YTReplacementDomain: str) -> str:
YTReplacementDomain: str,
showPublishedDateOnly: bool) -> str:
"""Show a page containing search results for a hashtag
"""
if hashtag.startswith('#'):
@ -830,6 +831,7 @@ def htmlHashtagSearch(nickname: str, domain: str, port: int,
httpPrefix, projectVersion,
'search',
YTReplacementDomain,
showPublishedDateOnly,
showIndividualPostIcons,
showIndividualPostIcons,
False, False, False)
@ -1116,7 +1118,8 @@ def htmlHistorySearch(translate: {}, baseDir: str,
wfRequest,
personCache: {},
port: int,
YTReplacementDomain: str) -> str:
YTReplacementDomain: str,
showPublishedDateOnly: bool) -> str:
"""Show a page containing search results for your post history
"""
if historysearch.startswith('!'):
@ -1188,6 +1191,7 @@ def htmlHistorySearch(translate: {}, baseDir: str,
httpPrefix, projectVersion,
'search',
YTReplacementDomain,
showPublishedDateOnly,
showIndividualPostIcons,
showIndividualPostIcons,
False, False, False)
@ -2931,7 +2935,8 @@ def htmlProfilePosts(recentPostsCache: {}, maxRecentPosts: int,
nickname: str, domain: str, port: int,
session, wfRequest: {}, personCache: {},
projectVersion: str,
YTReplacementDomain: str) -> str:
YTReplacementDomain: str,
showPublishedDateOnly: bool) -> str:
"""Shows posts on the profile screen
These should only be public posts
"""
@ -2965,6 +2970,7 @@ def htmlProfilePosts(recentPostsCache: {}, maxRecentPosts: int,
None, True, False,
httpPrefix, projectVersion, 'inbox',
YTReplacementDomain,
showPublishedDateOnly,
False, False, False, True, False)
if postStr:
profileStr += postStr
@ -3217,6 +3223,7 @@ def htmlProfile(defaultTimeline: str,
profileJson: {}, selected: str,
session, wfRequest: {}, personCache: {},
YTReplacementDomain: str,
showPublishedDateOnly: bool,
extraJson=None,
pageNumber=None, maxItemsPerPage=None) -> str:
"""Show the profile page as html
@ -3477,7 +3484,8 @@ def htmlProfile(defaultTimeline: str,
nickname, domain, port,
session, wfRequest, personCache,
projectVersion,
YTReplacementDomain) + licenseStr
YTReplacementDomain,
showPublishedDateOnly) + licenseStr
if selected == 'following':
profileStr += \
htmlProfileFollowing(translate, baseDir, httpPrefix,
@ -4262,6 +4270,7 @@ def individualPostAsHtml(allowDownloads: bool,
allowDeletion: bool,
httpPrefix: str, projectVersion: str,
boxName: str, YTReplacementDomain: str,
showPublishedDateOnly: bool,
showRepeats=True,
showIcons=False,
manuallyApprovesFollowers=False,
@ -5146,7 +5155,10 @@ def individualPostAsHtml(allowDownloads: bool,
publishedStr = \
publishedStr.replace('T', ' ').split('.')[0]
datetimeObject = parse(publishedStr)
publishedStr = datetimeObject.strftime("%a %b %d, %H:%M")
if not showPublishedDateOnly:
publishedStr = datetimeObject.strftime("%a %b %d, %H:%M")
else:
publishedStr = datetimeObject.strftime("%a %b %d")
# benchmark 15
if not allowDownloads:
@ -5640,6 +5652,7 @@ def htmlTimeline(defaultTimeline: str,
manuallyApproveFollowers: bool,
minimal: bool,
YTReplacementDomain: str,
showPublishedDateOnly: bool,
newswire: {}, moderator: bool,
positiveVoting: bool) -> str:
"""Show the timeline as html
@ -6250,6 +6263,7 @@ def htmlTimeline(defaultTimeline: str,
httpPrefix, projectVersion,
boxName,
YTReplacementDomain,
showPublishedDateOnly,
boxName != 'dm',
showIndividualPostIcons,
manuallyApproveFollowers,
@ -6316,6 +6330,7 @@ def htmlShares(defaultTimeline: str,
allowDeletion: bool,
httpPrefix: str, projectVersion: str,
YTReplacementDomain: str,
showPublishedDateOnly: bool,
newswire: {}, positiveVoting: bool) -> str:
"""Show the shares timeline as html
"""
@ -6328,7 +6343,9 @@ def htmlShares(defaultTimeline: str,
nickname, domain, port, None,
'tlshares', allowDeletion,
httpPrefix, projectVersion, manuallyApproveFollowers,
False, YTReplacementDomain, newswire, False,
False, YTReplacementDomain,
showPublishedDateOnly,
newswire, False,
positiveVoting)
@ -6340,6 +6357,7 @@ def htmlInbox(defaultTimeline: str,
allowDeletion: bool,
httpPrefix: str, projectVersion: str,
minimal: bool, YTReplacementDomain: str,
showPublishedDateOnly: bool,
newswire: {}, positiveVoting: bool) -> str:
"""Show the inbox as html
"""
@ -6352,7 +6370,9 @@ def htmlInbox(defaultTimeline: str,
nickname, domain, port, inboxJson,
'inbox', allowDeletion,
httpPrefix, projectVersion, manuallyApproveFollowers,
minimal, YTReplacementDomain, newswire, False,
minimal, YTReplacementDomain,
showPublishedDateOnly,
newswire, False,
positiveVoting)
@ -6364,6 +6384,7 @@ def htmlBookmarks(defaultTimeline: str,
allowDeletion: bool,
httpPrefix: str, projectVersion: str,
minimal: bool, YTReplacementDomain: str,
showPublishedDateOnly: bool,
newswire: {}, positiveVoting: bool) -> str:
"""Show the bookmarks as html
"""
@ -6376,7 +6397,9 @@ def htmlBookmarks(defaultTimeline: str,
nickname, domain, port, bookmarksJson,
'tlbookmarks', allowDeletion,
httpPrefix, projectVersion, manuallyApproveFollowers,
minimal, YTReplacementDomain, newswire, False,
minimal, YTReplacementDomain,
showPublishedDateOnly,
newswire, False,
positiveVoting)
@ -6388,6 +6411,7 @@ def htmlEvents(defaultTimeline: str,
allowDeletion: bool,
httpPrefix: str, projectVersion: str,
minimal: bool, YTReplacementDomain: str,
showPublishedDateOnly: bool,
newswire: {}, positiveVoting: bool) -> str:
"""Show the events as html
"""
@ -6400,7 +6424,9 @@ def htmlEvents(defaultTimeline: str,
nickname, domain, port, bookmarksJson,
'tlevents', allowDeletion,
httpPrefix, projectVersion, manuallyApproveFollowers,
minimal, YTReplacementDomain, newswire, False,
minimal, YTReplacementDomain,
showPublishedDateOnly,
newswire, False,
positiveVoting)
@ -6412,6 +6438,7 @@ def htmlInboxDMs(defaultTimeline: str,
allowDeletion: bool,
httpPrefix: str, projectVersion: str,
minimal: bool, YTReplacementDomain: str,
showPublishedDateOnly: bool,
newswire: {}, positiveVoting: bool) -> str:
"""Show the DM timeline as html
"""
@ -6420,7 +6447,8 @@ def htmlInboxDMs(defaultTimeline: str,
itemsPerPage, session, baseDir, wfRequest, personCache,
nickname, domain, port, inboxJson, 'dm', allowDeletion,
httpPrefix, projectVersion, False, minimal,
YTReplacementDomain, newswire, False, positiveVoting)
YTReplacementDomain, showPublishedDateOnly,
newswire, False, positiveVoting)
def htmlInboxReplies(defaultTimeline: str,
@ -6431,6 +6459,7 @@ def htmlInboxReplies(defaultTimeline: str,
allowDeletion: bool,
httpPrefix: str, projectVersion: str,
minimal: bool, YTReplacementDomain: str,
showPublishedDateOnly: bool,
newswire: {}, positiveVoting: bool) -> str:
"""Show the replies timeline as html
"""
@ -6439,7 +6468,9 @@ def htmlInboxReplies(defaultTimeline: str,
itemsPerPage, session, baseDir, wfRequest, personCache,
nickname, domain, port, inboxJson, 'tlreplies',
allowDeletion, httpPrefix, projectVersion, False,
minimal, YTReplacementDomain, newswire, False,
minimal, YTReplacementDomain,
showPublishedDateOnly,
newswire, False,
positiveVoting)
@ -6451,6 +6482,7 @@ def htmlInboxMedia(defaultTimeline: str,
allowDeletion: bool,
httpPrefix: str, projectVersion: str,
minimal: bool, YTReplacementDomain: str,
showPublishedDateOnly: bool,
newswire: {}, positiveVoting: bool) -> str:
"""Show the media timeline as html
"""
@ -6459,7 +6491,9 @@ def htmlInboxMedia(defaultTimeline: str,
itemsPerPage, session, baseDir, wfRequest, personCache,
nickname, domain, port, inboxJson, 'tlmedia',
allowDeletion, httpPrefix, projectVersion, False,
minimal, YTReplacementDomain, newswire, False,
minimal, YTReplacementDomain,
showPublishedDateOnly,
newswire, False,
positiveVoting)
@ -6471,6 +6505,7 @@ def htmlInboxBlogs(defaultTimeline: str,
allowDeletion: bool,
httpPrefix: str, projectVersion: str,
minimal: bool, YTReplacementDomain: str,
showPublishedDateOnly: bool,
newswire: {}, positiveVoting: bool) -> str:
"""Show the blogs timeline as html
"""
@ -6479,7 +6514,9 @@ def htmlInboxBlogs(defaultTimeline: str,
itemsPerPage, session, baseDir, wfRequest, personCache,
nickname, domain, port, inboxJson, 'tlblogs',
allowDeletion, httpPrefix, projectVersion, False,
minimal, YTReplacementDomain, newswire, False,
minimal, YTReplacementDomain,
showPublishedDateOnly,
newswire, False,
positiveVoting)
@ -6491,6 +6528,7 @@ def htmlInboxNews(defaultTimeline: str,
allowDeletion: bool,
httpPrefix: str, projectVersion: str,
minimal: bool, YTReplacementDomain: str,
showPublishedDateOnly: bool,
newswire: {}, moderator: bool,
positiveVoting: bool) -> str:
"""Show the news timeline as html
@ -6500,7 +6538,9 @@ def htmlInboxNews(defaultTimeline: str,
itemsPerPage, session, baseDir, wfRequest, personCache,
nickname, domain, port, inboxJson, 'tlnews',
allowDeletion, httpPrefix, projectVersion, False,
minimal, YTReplacementDomain, newswire, moderator,
minimal, YTReplacementDomain,
showPublishedDateOnly,
newswire, moderator,
positiveVoting)
@ -6512,6 +6552,7 @@ def htmlModeration(defaultTimeline: str,
allowDeletion: bool,
httpPrefix: str, projectVersion: str,
YTReplacementDomain: str,
showPublishedDateOnly: bool,
newswire: {}, positiveVoting: bool) -> str:
"""Show the moderation feed as html
"""
@ -6520,7 +6561,8 @@ def htmlModeration(defaultTimeline: str,
itemsPerPage, session, baseDir, wfRequest, personCache,
nickname, domain, port, inboxJson, 'moderation',
allowDeletion, httpPrefix, projectVersion, True, False,
YTReplacementDomain, newswire, False, positiveVoting)
YTReplacementDomain, showPublishedDateOnly,
newswire, False, positiveVoting)
def htmlOutbox(defaultTimeline: str,
@ -6531,6 +6573,7 @@ def htmlOutbox(defaultTimeline: str,
allowDeletion: bool,
httpPrefix: str, projectVersion: str,
minimal: bool, YTReplacementDomain: str,
showPublishedDateOnly: bool,
newswire: {}, positiveVoting: bool) -> str:
"""Show the Outbox as html
"""
@ -6542,7 +6585,8 @@ def htmlOutbox(defaultTimeline: str,
nickname, domain, port, outboxJson, 'outbox',
allowDeletion, httpPrefix, projectVersion,
manuallyApproveFollowers, minimal,
YTReplacementDomain, newswire, False, positiveVoting)
YTReplacementDomain, showPublishedDateOnly,
newswire, False, positiveVoting)
def htmlIndividualPost(recentPostsCache: {}, maxRecentPosts: int,
@ -6551,7 +6595,8 @@ def htmlIndividualPost(recentPostsCache: {}, maxRecentPosts: int,
nickname: str, domain: str, port: int, authorized: bool,
postJsonObject: {}, httpPrefix: str,
projectVersion: str, likedBy: str,
YTReplacementDomain: str) -> str:
YTReplacementDomain: str,
showPublishedDateOnly: bool) -> str:
"""Show an individual post as html
"""
iconsDir = getIconsDir(baseDir)
@ -6596,6 +6641,7 @@ def htmlIndividualPost(recentPostsCache: {}, maxRecentPosts: int,
None, True, False,
httpPrefix, projectVersion, 'inbox',
YTReplacementDomain,
showPublishedDateOnly,
False, authorized, False, False, False)
messageId = removeIdEnding(postJsonObject['id'])
@ -6620,6 +6666,7 @@ def htmlIndividualPost(recentPostsCache: {}, maxRecentPosts: int,
None, True, False,
httpPrefix, projectVersion, 'inbox',
YTReplacementDomain,
showPublishedDateOnly,
False, authorized,
False, False, False) + postStr
@ -6647,6 +6694,7 @@ def htmlIndividualPost(recentPostsCache: {}, maxRecentPosts: int,
None, True, False,
httpPrefix, projectVersion, 'inbox',
YTReplacementDomain,
showPublishedDateOnly,
False, authorized,
False, False, False)
cssFilename = baseDir + '/epicyon-profile.css'
@ -6665,7 +6713,8 @@ def htmlPostReplies(recentPostsCache: {}, maxRecentPosts: int,
session, wfRequest: {}, personCache: {},
nickname: str, domain: str, port: int, repliesJson: {},
httpPrefix: str, projectVersion: str,
YTReplacementDomain: str) -> str:
YTReplacementDomain: str,
showPublishedDateOnly: bool) -> str:
"""Show the replies to an individual post as html
"""
iconsDir = getIconsDir(baseDir)
@ -6681,6 +6730,7 @@ def htmlPostReplies(recentPostsCache: {}, maxRecentPosts: int,
None, True, False,
httpPrefix, projectVersion, 'inbox',
YTReplacementDomain,
showPublishedDateOnly,
False, False, False, False, False)
cssFilename = baseDir + '/epicyon-profile.css'
@ -6769,7 +6819,8 @@ def htmlDeletePost(recentPostsCache: {}, maxRecentPosts: int,
httpPrefix: str, projectVersion: str,
wfRequest: {}, personCache: {},
callingDomain: str,
YTReplacementDomain: str) -> str:
YTReplacementDomain: str,
showPublishedDateOnly: bool) -> str:
"""Shows a screen asking to confirm the deletion of a post
"""
if '/statuses/' not in messageId:
@ -6814,6 +6865,7 @@ def htmlDeletePost(recentPostsCache: {}, maxRecentPosts: int,
None, True, False,
httpPrefix, projectVersion, 'outbox',
YTReplacementDomain,
showPublishedDateOnly,
False, False, False, False, False)
deletePostStr += '<center>'
deletePostStr += \
@ -7788,7 +7840,8 @@ def htmlProfileAfterSearch(recentPostsCache: {}, maxRecentPosts: int,
profileHandle: str,
session, cachedWebfingers: {}, personCache: {},
debug: bool, projectVersion: str,
YTReplacementDomain: str) -> str:
YTReplacementDomain: str,
showPublishedDateOnly: bool) -> str:
"""Show a profile page after a search for a fediverse address
"""
if '/users/' in profileHandle or \
@ -7996,6 +8049,7 @@ def htmlProfileAfterSearch(recentPostsCache: {}, maxRecentPosts: int,
item, avatarUrl, False, False,
httpPrefix, projectVersion, 'inbox',
YTReplacementDomain,
showPublishedDateOnly,
False, False, False, False, False)
i += 1
if i >= 20: