forked from indymedia/epicyon
Check item title earlier
parent
38b072c32a
commit
7f4c490872
|
@ -205,6 +205,8 @@ def htmlNewswire(baseDir: str, newswire: {}, nickname: str, moderator: bool,
|
||||||
separatorStr = htmlPostSeparator(baseDir, 'right')
|
separatorStr = htmlPostSeparator(baseDir, 'right')
|
||||||
htmlStr = ''
|
htmlStr = ''
|
||||||
for dateStr, item in newswire.items():
|
for dateStr, item in newswire.items():
|
||||||
|
if not item[0].strip():
|
||||||
|
continue
|
||||||
publishedDate = \
|
publishedDate = \
|
||||||
datetime.strptime(dateStr, "%Y-%m-%d %H:%M:%S%z")
|
datetime.strptime(dateStr, "%Y-%m-%d %H:%M:%S%z")
|
||||||
dateShown = publishedDate.strftime("%Y-%m-%d %H:%M")
|
dateShown = publishedDate.strftime("%Y-%m-%d %H:%M")
|
||||||
|
@ -221,10 +223,7 @@ def htmlNewswire(baseDir: str, newswire: {}, nickname: str, moderator: bool,
|
||||||
totalVotesStr = \
|
totalVotesStr = \
|
||||||
votesIndicator(totalVotes, positiveVoting)
|
votesIndicator(totalVotes, positiveVoting)
|
||||||
|
|
||||||
title = \
|
title = removeLongWords(item[0], 16, []).replace('\n', '<br>')
|
||||||
removeLongWords(item[0], 16, []).replace('\n', '<br>').strip()
|
|
||||||
if not title:
|
|
||||||
continue
|
|
||||||
htmlStr += '<p class="newswireItemVotedOn">' + \
|
htmlStr += '<p class="newswireItemVotedOn">' + \
|
||||||
'<a href="' + item[1] + '">' + \
|
'<a href="' + item[1] + '">' + \
|
||||||
'<span class="newswireItemVotedOn">' + title + \
|
'<span class="newswireItemVotedOn">' + title + \
|
||||||
|
@ -250,10 +249,7 @@ def htmlNewswire(baseDir: str, newswire: {}, nickname: str, moderator: bool,
|
||||||
totalVotesStr = \
|
totalVotesStr = \
|
||||||
votesIndicator(totalVotes, positiveVoting)
|
votesIndicator(totalVotes, positiveVoting)
|
||||||
|
|
||||||
title = \
|
title = removeLongWords(item[0], 16, []).replace('\n', '<br>')
|
||||||
removeLongWords(item[0], 16, []).replace('\n', '<br>').strip()
|
|
||||||
if not title:
|
|
||||||
continue
|
|
||||||
if moderator and moderatedItem:
|
if moderator and moderatedItem:
|
||||||
htmlStr += '<p class="newswireItemModerated">' + \
|
htmlStr += '<p class="newswireItemModerated">' + \
|
||||||
'<a href="' + item[1] + '">' + \
|
'<a href="' + item[1] + '">' + \
|
||||||
|
@ -352,6 +348,8 @@ def htmlCitations(baseDir: str, nickname: str, domain: str,
|
||||||
if newswire:
|
if newswire:
|
||||||
ctr = 0
|
ctr = 0
|
||||||
for dateStr, item in newswire.items():
|
for dateStr, item in newswire.items():
|
||||||
|
if not item[0].strip():
|
||||||
|
continue
|
||||||
# should this checkbox be selected?
|
# should this checkbox be selected?
|
||||||
selectedStr = ''
|
selectedStr = ''
|
||||||
if dateStr in citationsSelected:
|
if dateStr in citationsSelected:
|
||||||
|
|
Loading…
Reference in New Issue