From 6697c761765e45aa8c06a13fddacb15cdb01b9ed Mon Sep 17 00:00:00 2001 From: Stefan Ritter Date: Mon, 15 Nov 2010 17:50:11 +0100 Subject: Use variable "tab" for tabs for better code style --- blogthon.cgi | 106 ++++++++++++++++++++++++++++++----------------------------- 1 file changed, 54 insertions(+), 52 deletions(-) (limited to 'blogthon.cgi') diff --git a/blogthon.cgi b/blogthon.cgi index 83c9433..6c48081 100755 --- a/blogthon.cgi +++ b/blogthon.cgi @@ -33,6 +33,8 @@ no_break = re.compile('^\s*(|||' print '' print '' - print ' Error!' + print tab + 'Error!' print '' print '' - print ' ' + string + print tab + string print '' print '' sys.exit() @@ -334,14 +336,14 @@ elif feed_display == "rss": # Generate regular page else: document_header("xhtml-strict") - print ' ' - print ' ' + blog_title + '' - print ' ' - print ' ' - print ' ' - print ' ' - print ' ' - print ' ' + print tab + '' + print tab*2 + '' + blog_title + '' + print tab*2 + '' + print tab*2 + '' + print tab*2 + '' + print tab*2 + '' + print tab + '' + print tab + '' print '' # Plugins @@ -350,26 +352,26 @@ else: __import__ (plugin.split('/')[1].replace('.py', '')) # Site header - print '
' - print '
' - print ' ' + blog_title + '' - print '
' - print '
' - print ' ' + blog_subtitle + '' - print '
' - print '
' + print tab*2 + '
' + print tab*3 + '
' + print tab*4 + '' + blog_title + '' + print tab*3 + '
' + print tab*3 + '
' + print tab*4 + '' + blog_subtitle + '' + print tab*3 + '
' + print tab*2 + '
' print '' # RSS feed - print '
' - print ' rss' - print '
' + print tab*2 + '
' + print tab*3 + 'rss' + print tab*2 + '
' print '' # Atom feed - print '
' - print ' atom' - print '
' + print tab*2 + '
' + print tab*3 + 'atom' + print tab*2 + '
' print '' # Staticpages @@ -377,10 +379,10 @@ else: staticpages = [] staticpages_list = glob.glob(staticpages_dir + '*') staticpages_list.sort() - print '
' - print '
' + blog_locale[0] + '
' - print '
' - print '
    ' + print tab*2 + '
    ' + print tab*3 + '
    ' + blog_locale[0] + '
    ' + print tab*3 + '
    ' + print tab*4 + '
      ' for staticpage in staticpages_list: file = open(staticpage, 'r') header = file.readline() @@ -391,55 +393,55 @@ else: link = '?s=' + link file.close() title = re.sub('\w+?\/\d+?-', '', staticpage) - print '
    • ' + title + '
    • ' - print '
    ' - print '
    ' - print ' ' - print '
    ' + print tab*5 + '
  • ' + title + '
  • ' + print tab*4 + '
' + print tab*3 + '
' + print tab*3 + '' + print tab*2 + '
' print '' # Monthlist if monthlist == "True": olddate = "" - print '
' - print '
' + blog_locale[1] + '
' - print '
' - print '
    ' + print tab*2 + '
    ' + print tab*3 + '
    ' + blog_locale[1] + '
    ' + print tab*3 + '
    ' + print tab*4 + '
      ' for entry in entries: date = time.strftime("%m%Y", entry[0]) date_display = time.strftime("%h %Y", entry[0]) if not olddate == date: - print '
    • ' + date_display + '
    • ' + print tab*5 + '
    • ' + date_display + '
    • ' olddate = date - print '
    ' - print '
    ' - print ' ' - print '
    ' + print tab*4 + '
' + print tab*3 + '
' + print tab*3 + '' + print tab*2 + '
' print '' # Linklist if linklist == "True": - print ' ' print '' - print '
' + print tab*2 + '
' print '' # Staticpage -- cgit v1.2.3