'
for line in content:
print ' ' + line.strip() + '
'
+
+ # Comments are shown when post_display and comments_file
+ comments_file = glob.glob(entries_dir + title + '.comments')
+ if comments_file and post_display:
+ print '
' + comments_file = glob.glob(entries_dir + title + '.comments') + comments_content = open(comments_file[0], "r") + for line in comments_content: + if line.split(".", 1)[0] == "-": + print '
' + print ' ' + line.split(".", 1)[1] + ' wrote at ' + elif line.split(".", 1)[0] == "+": + print ' ' + line.split(".", 1)[1] + ':
' + else: + line = line.split(".", 1)[1] + print ' ' + line.strip() + '
' + comments_content.close() + if comments == "True": comments_file = glob.glob(entries_dir + title + '.comments') - if not comments_file: + if not comments_file and not post_display: print '
' - else: + elif comments_file and not post_display: comments_content = open(comments_file[0], "r") comments_counter = 0 for line in comments_content: if line.split(".", 1)[0] == "-": comments_counter += 1 print '
'
- print ' '
+ print ' '
print '
' comments_content.close()
- no comments
' + print '- no comments
' print '