From f307babfd09326a72fbdb3afb9bc0e42fb2d622e Mon Sep 17 00:00:00 2001 From: Stefan Krulj Date: Sun, 6 May 2012 12:16:14 +0200 Subject: [PATCH] Comments by disqus added --- pylog.py | 20 ++++++++++++++++---- pylog_config.py | 34 ++++++++++++++++++++++++++++++++-- style.css | 13 +++++++++++++ 3 files changed, 61 insertions(+), 6 deletions(-) diff --git a/pylog.py b/pylog.py index 254b270..5d03398 100755 --- a/pylog.py +++ b/pylog.py @@ -98,7 +98,11 @@ def disp_file_dict(d,keys): 'disp':os.path.normpath(f)}).replace('&','&')+'">') print name+' - ', print datetime.fromtimestamp(int(k)).strftime(cfg.datefmt), - print '' + print ' ' + sys.stdout.write('') + print '' prev_actions[typ](f) @@ -256,9 +260,17 @@ try: disp_actions[typ](validdisp) else: disp_list(path) -except OSError: - pass +except OSError as ose: + # This is here for various errors that + # may occur when accessing files + print '' + print cfg.footer + print '' -print '' print '' print '' diff --git a/pylog_config.py b/pylog_config.py index 9169a3b..c5d6863 100644 --- a/pylog_config.py +++ b/pylog_config.py @@ -1,17 +1,47 @@ -title = 'PyLog' # Title displayed on the browser window +title = 'PyLog' # Title displayed on the browser window/tab blogtitle= 'Plog' # The blog's title subtitle=u'produced py Powertomato \xb0\u0DF4\xb0' # The text to be displayed under the blog title header=""" + + """ # This header will be printed in the section of the html file +footer=""" +
+ + +blog comments powered by Disqus +""" # This footer will be printed at the end of the tag + datefmt='%Y-%m-%d' # format of the date which is displayed next to the entry # See pythons manual reference for time.strptime for details contentdir="cnt" # directory where the content is located numofposts=5 # number of previews on the base site -numfeed=5 # number of previews in the feed +numfeed=5 # number of entries in the feed topurl="http://n0g.at/~powertomato/pylog/" # The URL which specifies the scripts location # if someone knows how to obtain it using CGI diff --git a/style.css b/style.css index f25348f..4aba6c6 100644 --- a/style.css +++ b/style.css @@ -176,6 +176,15 @@ h4 { counter-increment: subsubkap; } + +#footer h2:before, #footer h3:before, #footer h4:before { + content: ''; +} + +#dsq-footer { + display: none; +} + .entryheader { color:#5598ca; } @@ -185,6 +194,10 @@ h4 { color:#cccccc; } +.commentcount { + font-size:9pt; +} + #content { padding:5px; background-color:#f6f6f6;