diff options
Diffstat (limited to 'blogthon.cgi')
-rwxr-xr-x | blogthon.cgi | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/blogthon.cgi b/blogthon.cgi index c82aa3a..8488393 100755 --- a/blogthon.cgi +++ b/blogthon.cgi @@ -28,6 +28,7 @@ style = configuration.get('look', 'style') entries_per_page = configuration.getint('look', 'entries_per_page') monthlist = configuration.get('look', 'monthlist') staticpages = configuration.get('look', 'staticpages') +linklist = configuration.get('look', 'linklist') permalinks = configuration.get('look', 'permalinks') newest_first = configuration.get('look', 'newest_first') @@ -75,27 +76,37 @@ if staticpages: staticpages = [] staticpages_list = glob.glob(staticpages_dir + '*') staticpages_list.sort() - print ' <div class="staticpages">' + print ' <div class="sidebarentry">' print ' <small>pages</small><br />' for staticpage in staticpages_list: title = re.sub('\w+?\/\d+?-', '', staticpage) link = re.sub('\w+?\/', '', staticpage) print ' <a href="?s=' + link + '">' + title + '</a> <br />' - if monthlist and staticpages_list != []: print ' <br />' + if monthlist: print ' <br />' print ' </div>' if monthlist: olddate = "" - print ' <div class="monthlist">' + print ' <div class="sidebarentry">' print ' <small>months</small><br />' for entry in entries: date = time.strftime("%m%Y", entry[0]) date_display = time.strftime("%h %Y", entry[0]) if not olddate == date: - print ' <a href="?m=' + date + '">' + date_display + '</a><br />' + print ' <a href="?m=' + date + '">' + date_display + '</a> <br />' olddate = date + if linklist: print ' <br />' print ' </div>' +if linklist: + content = open("linklist", "r") + print ' <div class="sidebarentry">' + print ' <small>links</small><br />' + for line in content: + print ' <a href=' + line.split(" ")[0] + '>' + line.split(" ")[-1].strip() + '</a> <br />' + print ' </div>' + content.close() + print ' </div>' print ' <div class="content">' |