forked from indymedia/epicyon
Article html tag on blog
parent
87437fe55c
commit
1b69ea8bda
9
blog.py
9
blog.py
|
@ -166,10 +166,12 @@ def htmlBlogPostContent(authorized: bool,
|
||||||
if postJsonObject['object'].get('id'):
|
if postJsonObject['object'].get('id'):
|
||||||
messageLink = postJsonObject['object']['id'].replace('/statuses/', '/')
|
messageLink = postJsonObject['object']['id'].replace('/statuses/', '/')
|
||||||
titleStr = ''
|
titleStr = ''
|
||||||
|
articleAdded = False
|
||||||
if postJsonObject['object'].get('summary'):
|
if postJsonObject['object'].get('summary'):
|
||||||
titleStr = postJsonObject['object']['summary']
|
titleStr = postJsonObject['object']['summary']
|
||||||
blogStr += '<h1><a href="' + messageLink + '">' + \
|
blogStr += '<article><h1><a href="' + messageLink + '">' + \
|
||||||
titleStr + '</a></h1>\n'
|
titleStr + '</a></h1>\n'
|
||||||
|
articleAdded = True
|
||||||
|
|
||||||
# get the handle of the author
|
# get the handle of the author
|
||||||
if postJsonObject['object'].get('attributedTo'):
|
if postJsonObject['object'].get('attributedTo'):
|
||||||
|
@ -232,7 +234,10 @@ def htmlBlogPostContent(authorized: bool,
|
||||||
contentStr = replaceEmojiFromTags(contentStr,
|
contentStr = replaceEmojiFromTags(contentStr,
|
||||||
postJsonObject['object']['tag'],
|
postJsonObject['object']['tag'],
|
||||||
'content')
|
'content')
|
||||||
blogStr += '<br>' + contentStr + '\n'
|
if articleAdded:
|
||||||
|
blogStr += '<br>' + contentStr + '</article>\n'
|
||||||
|
else:
|
||||||
|
blogStr += '<br><article>' + contentStr + '</article>\n'
|
||||||
|
|
||||||
citationsStr = ''
|
citationsStr = ''
|
||||||
if postJsonObject['object'].get('tag'):
|
if postJsonObject['object'].get('tag'):
|
||||||
|
|
Loading…
Reference in New Issue