fix formatting
This commit is contained in:
+6
-6
@@ -28,8 +28,9 @@ def generateBodies(db):
|
||||
copyrightHolder = config['server']['copyright_holder']
|
||||
blogRoll = []
|
||||
blobStack = ""
|
||||
timeString = '%B %-d %Y %-I:%M %p'
|
||||
for p in bbdb.getAllPosts(db):
|
||||
postURLIntro = '<a href="' + documentRoot + "/blog/posts/" + str(p["timestamp"]) + '.html">'
|
||||
postURLIntro = '<a href="' + documentRoot + "/blog/posts/" + str(p["timestamp"]) + '.html" title="permalink">'
|
||||
|
||||
if p["title"] != None:
|
||||
newPost = '<div class="blobs mainbox blogpost">'
|
||||
@@ -50,15 +51,14 @@ def generateBodies(db):
|
||||
|
||||
with open("./blog/posts/" + str(p["timestamp"]) + ".html", "w") as f:
|
||||
singlePost = newPost + bodyText
|
||||
singlePost = singlePost + '<p style="font-size:small;text-align:right">'
|
||||
singlePost = singlePost + datetime.fromtimestamp(ts).strftime('%B %-d, %Y') + '</p>'
|
||||
singlePost = singlePost + '<p style="font-size:small;text-align:right">' + postURLIntro
|
||||
singlePost = singlePost + datetime.fromtimestamp(ts).strftime(timeString) + '</a></p>'
|
||||
singlePost = singlePost + '</div>'
|
||||
f.write(postTemplate.render(webRoot=documentRoot, blogContent=singlePost, siteCopyright=copyrightHolder))
|
||||
|
||||
newPost = newPost + formattedBody
|
||||
newPost = newPost + '<p style="font-size:small;text-align:right">' + datetime.fromtimestamp(ts).strftime('%B %-d, %Y ')
|
||||
newPost = newPost + postURLIntro
|
||||
newPost = newPost + 'permalink</a></p></div>'
|
||||
newPost = newPost + '<p style="font-size:small;text-align:right">' + postURLIntro + datetime.fromtimestamp(ts).strftime(timeString)
|
||||
newPost = newPost + '</a></p></div>'
|
||||
blogRoll.append(newPost)
|
||||
|
||||
postCount += 1
|
||||
|
||||
Reference in New Issue
Block a user