From 5d613ca454a09e593111bb30767ada41c5b6fe89 Mon Sep 17 00:00:00 2001 From: Stefan Krulj Date: Tue, 25 Dec 2012 15:56:52 +0100 Subject: [PATCH] simplified url generation in dir-preview --- pylog.py | 5 ++--- pylog_config.py | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pylog.py b/pylog.py index 8799844..b9f814f 100755 --- a/pylog.py +++ b/pylog.py @@ -99,8 +99,7 @@ def disp_file_dict(d,keys): name = os.path.basename(f) if typ in prev_actions and not os.path.isdir(f): sys.stdout.write('

') + sys.stdout.write('disp='+os.path.normpath(f)+'">') print name+' -  ' @@ -202,7 +201,7 @@ else: print " "+name+"" link = ET.Element("link") - link.text = cfg.topurl+script+'?'+urllib.urlencode({'path': os.path.normpath(os.path.dirname(f)),'disp':os.path.normpath(f)}) + link.text = cfg.topurl+script+'?'+'disp='+os.path.normpath(f) print " ", ET.dump(link) link.tag="guid" diff --git a/pylog_config.py b/pylog_config.py index 3b628de..25cf95e 100644 --- a/pylog_config.py +++ b/pylog_config.py @@ -22,6 +22,7 @@ datefmt='%Y-%m-%d' contentdir="cnt" # directory where the content is located + numofposts=5 # number of previews on the base site numfeed=5