From bdbc414fea79efbec11291ef83c726233538575d Mon Sep 17 00:00:00 2001 From: Stefan Ritter Date: Fri, 20 Jan 2012 22:59:11 +0100 Subject: Add initial tag system --- blogthon.cgi | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'blogthon.cgi') diff --git a/blogthon.cgi b/blogthon.cgi index c1c8870..6d3993f 100755 --- a/blogthon.cgi +++ b/blogthon.cgi @@ -574,7 +574,17 @@ else: else: print(ind*4 + "
%s
" % title) print(ind*4 + "
%s
" % date) + + # Read tags + tags = content.readline().strip() + if re.match(line_start_plus, tags): + tags = tags.replace("+", "") + print(ind*4 + "
Tags: %s
" % tags) + else: + content.seek(0) + print(ind*4 + "
") + for line in content: if no_break.match(line): print(ind*5 + line.strip()) -- cgit v1.2.3