Indentation

main
Bob Mottram 2020-09-30 22:05:32 +01:00
parent db79dcf0ee
commit 827ebad166
1 changed files with 28 additions and 28 deletions

View File

@ -4143,7 +4143,7 @@ def individualPostAsHtml(allowDownloads: bool,
if timeDiff > 100: if timeDiff > 100:
print('TIMING INDIV ' + boxName + ' 7 = ' + str(timeDiff)) print('TIMING INDIV ' + boxName + ' 7 = ' + str(timeDiff))
avatarLink = ' <a class="imageAnchor" href="' + postActor + '">' avatarLink = ' <a class="imageAnchor" href="' + postActor + '">'
avatarLink += \ avatarLink += \
' <img loading="lazy" src="' + avatarUrl + '" title="' + \ ' <img loading="lazy" src="' + avatarUrl + '" title="' + \
translate['Show profile'] + '" alt=" "' + avatarPosition + '/></a>\n' translate['Show profile'] + '" alt=" "' + avatarPosition + '/></a>\n'
@ -4151,7 +4151,7 @@ def individualPostAsHtml(allowDownloads: bool,
if showAvatarOptions and \ if showAvatarOptions and \
fullDomain + '/users/' + nickname not in postActor: fullDomain + '/users/' + nickname not in postActor:
avatarLink = \ avatarLink = \
' <a class="imageAnchor" href="/users/' + \ ' <a class="imageAnchor" href="/users/' + \
nickname + '?options=' + postActor + \ nickname + '?options=' + postActor + \
';' + str(pageNumber) + ';' + avatarUrl + messageIdStr + '">\n' ';' + str(pageNumber) + ';' + avatarUrl + messageIdStr + '">\n'
avatarLink += \ avatarLink += \
@ -4230,7 +4230,7 @@ def individualPostAsHtml(allowDownloads: bool,
nickname, domain, nickname, domain,
displayName, False) displayName, False)
titleStr += \ titleStr += \
' <a class="imageAnchor" href="/users/' + \ ' <a class="imageAnchor" href="/users/' + \
nickname + '?options=' + postActor + \ nickname + '?options=' + postActor + \
';' + str(pageNumber) + ';' + avatarUrl + messageIdStr + \ ';' + str(pageNumber) + ';' + avatarUrl + messageIdStr + \
'">' + displayName + '</a>\n' '">' + displayName + '</a>\n'
@ -4245,7 +4245,7 @@ def individualPostAsHtml(allowDownloads: bool,
# pprint(postJsonObject) # pprint(postJsonObject)
print('ERROR: no actorDomain') print('ERROR: no actorDomain')
titleStr += \ titleStr += \
' <a class="imageAnchor" href="/users/' + \ ' <a class="imageAnchor" href="/users/' + \
nickname + '?options=' + postActor + \ nickname + '?options=' + postActor + \
';' + str(pageNumber) + ';' + avatarUrl + messageIdStr + \ ';' + str(pageNumber) + ';' + avatarUrl + messageIdStr + \
'">@' + actorNickname + '@' + actorDomain + '</a>\n' '">@' + actorNickname + '@' + actorDomain + '</a>\n'
@ -4289,20 +4289,20 @@ def individualPostAsHtml(allowDownloads: bool,
replyStr = '' replyStr = ''
if isPublicRepeat: if isPublicRepeat:
replyStr += \ replyStr += \
' <a class="imageAnchor" href="/users/' + \ ' <a class="imageAnchor" href="/users/' + \
nickname + '?replyto=' + replyToLink + \ nickname + '?replyto=' + replyToLink + \
'?actor=' + postJsonObject['actor'] + \ '?actor=' + postJsonObject['actor'] + \
'" title="' + translate['Reply to this post'] + '">\n' '" title="' + translate['Reply to this post'] + '">\n'
else: else:
if isDM(postJsonObject): if isDM(postJsonObject):
replyStr += \ replyStr += \
' <a class="imageAnchor" href="/users/' + nickname + \ ' <a class="imageAnchor" href="/users/' + nickname + \
'?replydm=' + replyToLink + \ '?replydm=' + replyToLink + \
'?actor=' + postJsonObject['actor'] + \ '?actor=' + postJsonObject['actor'] + \
'" title="' + translate['Reply to this post'] + '">\n' '" title="' + translate['Reply to this post'] + '">\n'
else: else:
replyStr += \ replyStr += \
' <a class="imageAnchor" href="/users/' + nickname + \ ' <a class="imageAnchor" href="/users/' + nickname + \
'?replyfollowers=' + replyToLink + \ '?replyfollowers=' + replyToLink + \
'?actor=' + postJsonObject['actor'] + \ '?actor=' + postJsonObject['actor'] + \
'" title="' + translate['Reply to this post'] + '">\n' '" title="' + translate['Reply to this post'] + '">\n'
@ -4333,7 +4333,7 @@ def individualPostAsHtml(allowDownloads: bool,
if isBlogPost(postJsonObject): if isBlogPost(postJsonObject):
blogPostId = postJsonObject['object']['id'] blogPostId = postJsonObject['object']['id']
editStr += \ editStr += \
' <a class="imageAnchor" href="/users/' + nickname + \ ' <a class="imageAnchor" href="/users/' + nickname + \
'/tlblogs?editblogpost=' + \ '/tlblogs?editblogpost=' + \
blogPostId.split('/statuses/')[1] + \ blogPostId.split('/statuses/')[1] + \
'?actor=' + actorNickname + \ '?actor=' + actorNickname + \
@ -4345,7 +4345,7 @@ def individualPostAsHtml(allowDownloads: bool,
elif isEvent: elif isEvent:
eventPostId = postJsonObject['object']['id'] eventPostId = postJsonObject['object']['id']
editStr += \ editStr += \
' <a class="imageAnchor" href="/users/' + nickname + \ ' <a class="imageAnchor" href="/users/' + nickname + \
'/tlblogs?editeventpost=' + \ '/tlblogs?editeventpost=' + \
eventPostId.split('/statuses/')[1] + \ eventPostId.split('/statuses/')[1] + \
'?actor=' + actorNickname + \ '?actor=' + actorNickname + \
@ -4369,7 +4369,7 @@ def individualPostAsHtml(allowDownloads: bool,
announceLink = 'unrepeatprivate' announceLink = 'unrepeatprivate'
announceTitle = translate['Undo the repeat'] announceTitle = translate['Undo the repeat']
announceStr = \ announceStr = \
' <a class="imageAnchor" href="/users/' + \ ' <a class="imageAnchor" href="/users/' + \
nickname + '?' + announceLink + \ nickname + '?' + announceLink + \
'=' + postJsonObject['object']['id'] + pageNumberParam + \ '=' + postJsonObject['object']['id'] + pageNumberParam + \
'?actor=' + postJsonObject['actor'] + \ '?actor=' + postJsonObject['actor'] + \
@ -4433,7 +4433,7 @@ def individualPostAsHtml(allowDownloads: bool,
likeStr += likeCountStr.replace('(', '').replace(')', '').strip() likeStr += likeCountStr.replace('(', '').replace(')', '').strip()
likeStr += '</label>\n' likeStr += '</label>\n'
likeStr += \ likeStr += \
' <a class="imageAnchor" href="/users/' + nickname + '?' + \ ' <a class="imageAnchor" href="/users/' + nickname + '?' + \
likeLink + '=' + postJsonObject['object']['id'] + \ likeLink + '=' + postJsonObject['object']['id'] + \
pageNumberParam + \ pageNumberParam + \
'?actor=' + postJsonObject['actor'] + \ '?actor=' + postJsonObject['actor'] + \
@ -4466,7 +4466,7 @@ def individualPostAsHtml(allowDownloads: bool,
if timeDiff > 100: if timeDiff > 100:
print('TIMING INDIV ' + boxName + ' 12.6 = ' + str(timeDiff)) print('TIMING INDIV ' + boxName + ' 12.6 = ' + str(timeDiff))
bookmarkStr = \ bookmarkStr = \
' <a class="imageAnchor" href="/users/' + nickname + '?' + \ ' <a class="imageAnchor" href="/users/' + nickname + '?' + \
bookmarkLink + '=' + postJsonObject['object']['id'] + \ bookmarkLink + '=' + postJsonObject['object']['id'] + \
pageNumberParam + \ pageNumberParam + \
'?actor=' + postJsonObject['actor'] + \ '?actor=' + postJsonObject['actor'] + \
@ -4498,7 +4498,7 @@ def individualPostAsHtml(allowDownloads: bool,
messageId.startswith(postActor))): messageId.startswith(postActor))):
if '/users/' + nickname + '/' in messageId: if '/users/' + nickname + '/' in messageId:
deleteStr = \ deleteStr = \
' <a class="imageAnchor" href="/users/' + nickname + \ ' <a class="imageAnchor" href="/users/' + nickname + \
'?delete=' + messageId + pageNumberParam + \ '?delete=' + messageId + pageNumberParam + \
'" title="' + translate['Delete this post'] + '">\n' '" title="' + translate['Delete this post'] + '">\n'
deleteStr += \ deleteStr += \
@ -4508,7 +4508,7 @@ def individualPostAsHtml(allowDownloads: bool,
else: else:
if not isMuted: if not isMuted:
muteStr = \ muteStr = \
' <a class="imageAnchor" href="/users/' + nickname + \ ' <a class="imageAnchor" href="/users/' + nickname + \
'?mute=' + messageId + pageNumberParam + '?tl=' + boxName + \ '?mute=' + messageId + pageNumberParam + '?tl=' + boxName + \
'?bm=' + timelinePostBookmark + \ '?bm=' + timelinePostBookmark + \
'" title="' + translate['Mute this post'] + '">\n' '" title="' + translate['Mute this post'] + '">\n'
@ -4519,7 +4519,7 @@ def individualPostAsHtml(allowDownloads: bool,
'" src="/' + iconsDir + '/mute.png"/></a>\n' '" src="/' + iconsDir + '/mute.png"/></a>\n'
else: else:
muteStr = \ muteStr = \
' <a class="imageAnchor" href="/users/' + \ ' <a class="imageAnchor" href="/users/' + \
nickname + '?unmute=' + messageId + \ nickname + '?unmute=' + messageId + \
pageNumberParam + '?tl=' + boxName + '?bm=' + \ pageNumberParam + '?tl=' + boxName + '?bm=' + \
timelinePostBookmark + '" title="' + \ timelinePostBookmark + '" title="' + \
@ -4618,7 +4618,7 @@ def individualPostAsHtml(allowDownloads: bool,
replyAvatarImageInPost = \ replyAvatarImageInPost = \
' ' \ ' ' \
'<div class="timeline-avatar-reply">\n' \ '<div class="timeline-avatar-reply">\n' \
' <a class="imageAnchor" ' + \ ' <a class="imageAnchor" ' + \
'href="/users/' + nickname + \ 'href="/users/' + nickname + \
'?options=' + \ '?options=' + \
announceActor + ';' + str(pageNumber) + \ announceActor + ';' + str(pageNumber) + \
@ -4715,7 +4715,7 @@ def individualPostAsHtml(allowDownloads: bool,
boxName + ' 13.6 = ' + boxName + ' 13.6 = ' +
str(timeDiff)) str(timeDiff))
titleStr += \ titleStr += \
' <img loading="lazy" title="' + \ ' <img loading="lazy" title="' + \
translate['replying to'] + \ translate['replying to'] + \
'" alt="' + \ '" alt="' + \
translate['replying to'] + \ translate['replying to'] + \
@ -4773,7 +4773,7 @@ def individualPostAsHtml(allowDownloads: bool,
inReplyTo = \ inReplyTo = \
postJsonObject['object']['inReplyTo'] postJsonObject['object']['inReplyTo']
titleStr += \ titleStr += \
' <img loading="lazy" title="' + \ ' <img loading="lazy" title="' + \
translate['replying to'] + \ translate['replying to'] + \
'" alt="' + \ '" alt="' + \
translate['replying to'] + \ translate['replying to'] + \
@ -4786,7 +4786,7 @@ def individualPostAsHtml(allowDownloads: bool,
replyDomain + '</a>\n' replyDomain + '</a>\n'
else: else:
titleStr += \ titleStr += \
' <img loading="lazy" title="' + \ ' <img loading="lazy" title="' + \
translate['replying to'] + \ translate['replying to'] + \
'" alt="' + \ '" alt="' + \
translate['replying to'] + \ translate['replying to'] + \
@ -4806,7 +4806,7 @@ def individualPostAsHtml(allowDownloads: bool,
postDomain = postDomain.split('/', 1)[0] postDomain = postDomain.split('/', 1)[0]
if postDomain: if postDomain:
titleStr += \ titleStr += \
' <img loading="lazy" title="' + \ ' <img loading="lazy" title="' + \
translate['replying to'] + \ translate['replying to'] + \
'" alt="' + translate['replying to'] + \ '" alt="' + translate['replying to'] + \
'" src="/' + \ '" src="/' + \
@ -5282,7 +5282,7 @@ def htmlTimeline(defaultTimeline: str,
# what screen to go to when a new post is created # what screen to go to when a new post is created
if boxName == 'dm': if boxName == 'dm':
newPostButtonStr = \ newPostButtonStr = \
' <a class="imageAnchor" href="' + usersPath + \ ' <a class="imageAnchor" href="' + usersPath + \
'/newdm"><img loading="lazy" src="/' + \ '/newdm"><img loading="lazy" src="/' + \
iconsDir + '/newpost.png" title="' + \ iconsDir + '/newpost.png" title="' + \
translate['Create a new DM'] + \ translate['Create a new DM'] + \
@ -5290,7 +5290,7 @@ def htmlTimeline(defaultTimeline: str,
'" class="timelineicon"/></a>\n' '" class="timelineicon"/></a>\n'
elif boxName == 'tlblogs': elif boxName == 'tlblogs':
newPostButtonStr = \ newPostButtonStr = \
' <a class="imageAnchor" href="' + usersPath + \ ' <a class="imageAnchor" href="' + usersPath + \
'/newblog"><img loading="lazy" src="/' + \ '/newblog"><img loading="lazy" src="/' + \
iconsDir + '/newpost.png" title="' + \ iconsDir + '/newpost.png" title="' + \
translate['Create a new post'] + '" alt="| ' + \ translate['Create a new post'] + '" alt="| ' + \
@ -5298,7 +5298,7 @@ def htmlTimeline(defaultTimeline: str,
'" class="timelineicon"/></a>\n' '" class="timelineicon"/></a>\n'
elif boxName == 'tlevents': elif boxName == 'tlevents':
newPostButtonStr = \ newPostButtonStr = \
' <a class="imageAnchor" href="' + usersPath + \ ' <a class="imageAnchor" href="' + usersPath + \
'/newevent"><img loading="lazy" src="/' + \ '/newevent"><img loading="lazy" src="/' + \
iconsDir + '/newpost.png" title="' + \ iconsDir + '/newpost.png" title="' + \
translate['Create a new event'] + '" alt="| ' + \ translate['Create a new event'] + '" alt="| ' + \
@ -5307,7 +5307,7 @@ def htmlTimeline(defaultTimeline: str,
else: else:
if not manuallyApproveFollowers: if not manuallyApproveFollowers:
newPostButtonStr = \ newPostButtonStr = \
' <a class="imageAnchor" href="' + usersPath + \ ' <a class="imageAnchor" href="' + usersPath + \
'/newpost"><img loading="lazy" src="/' + \ '/newpost"><img loading="lazy" src="/' + \
iconsDir + '/newpost.png" title="' + \ iconsDir + '/newpost.png" title="' + \
translate['Create a new post'] + '" alt="| ' + \ translate['Create a new post'] + '" alt="| ' + \
@ -5315,7 +5315,7 @@ def htmlTimeline(defaultTimeline: str,
'" class="timelineicon"/></a>\n' '" class="timelineicon"/></a>\n'
else: else:
newPostButtonStr = \ newPostButtonStr = \
' <a class="imageAnchor" href="' + usersPath + \ ' <a class="imageAnchor" href="' + usersPath + \
'/newfollowers"><img loading="lazy" src="/' + \ '/newfollowers"><img loading="lazy" src="/' + \
iconsDir + '/newpost.png" title="' + \ iconsDir + '/newpost.png" title="' + \
translate['Create a new post'] + \ translate['Create a new post'] + \
@ -5421,7 +5421,7 @@ def htmlTimeline(defaultTimeline: str,
# the search button # the search button
tlStr += \ tlStr += \
' <a class="imageAnchor" href="' + usersPath + \ ' <a class="imageAnchor" href="' + usersPath + \
'/search"><img loading="lazy" src="/' + \ '/search"><img loading="lazy" src="/' + \
iconsDir + '/search.png" title="' + \ iconsDir + '/search.png" title="' + \
translate['Search and follow'] + '" alt="| ' + \ translate['Search and follow'] + '" alt="| ' + \
@ -5438,14 +5438,14 @@ def htmlTimeline(defaultTimeline: str,
# indicate that the calendar icon is highlighted # indicate that the calendar icon is highlighted
calendarAltText = '*' + calendarAltText + '*' calendarAltText = '*' + calendarAltText + '*'
tlStr += \ tlStr += \
' <a class="imageAnchor" href="' + usersPath + calendarPath + \ ' <a class="imageAnchor" href="' + usersPath + calendarPath + \
'"><img loading="lazy" src="/' + iconsDir + '/' + \ '"><img loading="lazy" src="/' + iconsDir + '/' + \
calendarImage + '" title="' + translate['Calendar'] + \ calendarImage + '" title="' + translate['Calendar'] + \
'" alt="| ' + calendarAltText + '" class="timelineicon"/></a>\n' '" alt="| ' + calendarAltText + '" class="timelineicon"/></a>\n'
# the show/hide button, for a simpler header appearance # the show/hide button, for a simpler header appearance
tlStr += \ tlStr += \
' <a class="imageAnchor" href="' + usersPath + '/minimal' + \ ' <a class="imageAnchor" href="' + usersPath + '/minimal' + \
'"><img loading="lazy" src="/' + iconsDir + \ '"><img loading="lazy" src="/' + iconsDir + \
'/showhide.png" title="' + translate['Show/Hide Buttons'] + \ '/showhide.png" title="' + translate['Show/Hide Buttons'] + \
'" alt="| ' + translate['Show/Hide Buttons'] + \ '" alt="| ' + translate['Show/Hide Buttons'] + \