From e05d1c9debee83ed1c00b1193c4f01a29cf7c96c Mon Sep 17 00:00:00 2001 From: pictuga Date: Sun, 2 Jun 2013 23:45:41 +0200 Subject: [PATCH] Replace uppercase title with "title-case" --- morss.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/morss.py b/morss.py index e72b800..befdff0 100644 --- a/morss.py +++ b/morss.py @@ -345,6 +345,11 @@ def Fill(rss, cache, feedurl="/", fast=False): if urlparse.urlparse(item.link).netloc is '': item.link = urlparse.urljoin(feedurl, item.link) + # check unwanted uppercase title + if 'title' in item: + if len(item.title) > 20 and item.title.isupper(): + item.title = item.title.title() + # content already provided? if 'content' in item and 'desc' in item: len_content = lenHTML(item.content)