Replace uppercase title with "title-case"

master
pictuga 2013-06-02 23:45:41 +02:00
parent f09dfbacf5
commit e05d1c9deb
1 changed files with 5 additions and 0 deletions

View File

@ -345,6 +345,11 @@ def Fill(rss, cache, feedurl="/", fast=False):
if urlparse.urlparse(item.link).netloc is '': if urlparse.urlparse(item.link).netloc is '':
item.link = urlparse.urljoin(feedurl, item.link) 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? # content already provided?
if 'content' in item and 'desc' in item: if 'content' in item and 'desc' in item:
len_content = lenHTML(item.content) len_content = lenHTML(item.content)