From 24cb3a9182a777f015cfc696fae162c1a1f8a5b3 Mon Sep 17 00:00:00 2001 From: Phyks Date: Sun, 13 Jul 2014 01:08:14 +0200 Subject: [PATCH] =?UTF-8?q?Forgot=20that=20internal=20tags=20(@author=20an?= =?UTF-8?q?d=20so)=20will=20end=20in=20the=20RSS=20description=E2=80=A6=20?= =?UTF-8?q?Fixed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pre-commit.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pre-commit.py b/pre-commit.py index b324453..2d9a809 100755 --- a/pre-commit.py +++ b/pre-commit.py @@ -781,6 +781,7 @@ rss += ("\t" # Generate header (except title) + index file + rss file for i, article in enumerate(["gen/"+x[4:-5]+".gen" for x in last_articles]): content, title, tags, date, author = "", "", "", "", "" + content_desc = "" try: with open(article, "r") as fh: for line in fh.readlines(): @@ -797,6 +798,7 @@ for i, article in enumerate(["gen/"+x[4:-5]+".gen" for x in last_articles]): if "@tags=" in line: tags = line[line.find("@tags=")+6:].strip() continue + content_desc += line except IOError: sys.exit("[ERROR] Unable to open "+article+" file.") @@ -823,7 +825,7 @@ for i, article in enumerate(["gen/"+x[4:-5]+".gen" for x in last_articles]): "\t\t\t" + params["PROTOCOL"] + params["BLOG_URL"]+"/"+article[4:-4]+".html\n" # Apply remove_tags twice to also remove tags in @title and so - "\t\t\t" + truncate(remove_tags(remove_tags(replace_tags(get_text_rss(content), + "\t\t\t" + truncate(remove_tags(remove_tags(replace_tags(get_text_rss(content_desc), search_list, replace_list)))) + "\n" +