diff options
author | Stefan Ritter <xeno@thehappy.de> | 2010-11-15 16:14:23 +0100 |
---|---|---|
committer | Stefan Ritter <xeno@thehappy.de> | 2010-11-15 16:14:23 +0100 |
commit | e4b3672547ab03f6e2891cf76f194c971919ada4 (patch) | |
tree | c490747a82f6a20c5e4d39b4a2b234453ac00bee | |
parent | 4fe866b7269c2cdc87c222d3b6548916a4ddddbc (diff) |
Removed staticpages_images stuff (needs testing)
-rwxr-xr-x | blogthon.cgi | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/blogthon.cgi b/blogthon.cgi index 00e5138..83c9433 100755 --- a/blogthon.cgi +++ b/blogthon.cgi @@ -32,7 +32,6 @@ import smtplib no_break = re.compile('^\s*(<ul|</ul>|<li|</li>|<ol|</ol>|<table|</table>|<tr|</tr>|<td|</td>|<th|</th>|<p|</p>).*$') line_start_hyphen = re.compile('^-.*$') line_start_plus = re.compile('^\+.*$') -filetype_image = re.compile('.*\.[gG][iI][fF]$|.*\.[pP][nN][gG]$|.*\.[jJ][pP][gG]$') def generate_uuid(string): string_md5sum = md5.new(string).hexdigest() @@ -376,12 +375,7 @@ else: # Staticpages if staticpages == "True": staticpages = [] - staticpages_images = [] staticpages_list = glob.glob(staticpages_dir + '*') - for i in staticpages_list: - if re.match(filetype_image, i): - staticpages_list.remove(i) - staticpages_images.append(i) staticpages_list.sort() print ' <div class="pages">' print ' <div class="pages_title">' + blog_locale[0] + '</div>' @@ -397,14 +391,7 @@ else: link = '?s=' + link file.close() title = re.sub('\w+?\/\d+?-', '', staticpage) - if staticpages_images: - for i in staticpages_images: - if staticpage == i[:len(i)-4]: - print ' <li class="pages_list_entry"><a href="' + link + '" class="pages_list_entry"><img src="' + i + '"></a></li>' - else: - print ' <li class="pages_list_entry"><a href="' + link + '" class="pages_list_entry">' + title + '</a></li>' - else: - print ' <li class="pages_list_entry"><a href="' + link + '" class="pages_list_entry">' + title + '</a></li>' + print ' <li class="pages_list_entry"><a href="' + link + '" class="pages_list_entry">' + title + '</a></li>' print ' </ul>' print ' </div>' print ' <div class="pages_footer"></div>' |