From 26d3a5096b6020150981b56ebce649231a1a015a Mon Sep 17 00:00:00 2001 From: Mikaela Suomalainen Date: Sat, 22 Mar 2014 13:19:01 +0200 Subject: [PATCH 1/6] Aka: fix first comment in l10n-fi. --- plugins/Aka/locales/fi.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/Aka/locales/fi.po b/plugins/Aka/locales/fi.po index 119a0aa76..0e47fd2c0 100644 --- a/plugins/Aka/locales/fi.po +++ b/plugins/Aka/locales/fi.po @@ -1,6 +1,6 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR ORGANIZATION -# FIRST AUTHOR , YEAR. +# Aka plugin for Limnoria +# Copyright (C) 2014 Limnoria +# Mikaela Suomalainen , 2014. # msgid "" msgstr "" From 933d4d3ffaff2470710c4996a0f457a57536334c Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Sat, 22 Mar 2014 11:29:19 +0000 Subject: [PATCH 2/6] RSS: Another attempt at fixing encoding issues. --- plugins/RSS/plugin.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/plugins/RSS/plugin.py b/plugins/RSS/plugin.py index 7807f4b70..6a1959021 100644 --- a/plugins/RSS/plugin.py +++ b/plugins/RSS/plugin.py @@ -150,14 +150,22 @@ class RSS(callbacks.Plugin): if headline[2]: pubDate = ' [%s]' % (headline[2],) if sys.version_info[0] < 3: + try: + import charade.universaldetector + u = charade.universaldetector.UniversalDetector() + u.feed(s) + u.close() + encoding = u.result['encoding'] + except ImportError: + encoding = 'utf8' if isinstance(headline[0], unicode): newheadlines.append(format('%s %u%s', - headline[0].encode('utf-8','replace'), + headline[0].encode(encoding,'replace'), link, pubDate)) else: newheadlines.append(format('%s %u%s', - headline[0].decode('utf-8','replace'), + headline[0] link, pubDate)) else: From 04cf2ca27a207daad8e614b30ce237b1a5f52c1c Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Sat, 22 Mar 2014 11:37:52 +0000 Subject: [PATCH 3/6] RSS: Fix typo. --- plugins/RSS/plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/RSS/plugin.py b/plugins/RSS/plugin.py index 6a1959021..66f556f16 100644 --- a/plugins/RSS/plugin.py +++ b/plugins/RSS/plugin.py @@ -165,7 +165,7 @@ class RSS(callbacks.Plugin): pubDate)) else: newheadlines.append(format('%s %u%s', - headline[0] + headline[0], link, pubDate)) else: From 06c83cbf14ba142d2b49652b6bf6fd7501b72928 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Sat, 22 Mar 2014 11:47:28 +0000 Subject: [PATCH 4/6] RSS: Fix typo (again). --- plugins/RSS/plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/RSS/plugin.py b/plugins/RSS/plugin.py index 66f556f16..9482598a1 100644 --- a/plugins/RSS/plugin.py +++ b/plugins/RSS/plugin.py @@ -153,7 +153,7 @@ class RSS(callbacks.Plugin): try: import charade.universaldetector u = charade.universaldetector.UniversalDetector() - u.feed(s) + u.feed(headline[0]) u.close() encoding = u.result['encoding'] except ImportError: From ecadc05c7c361f8b944de420e46a569853687059 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Sat, 22 Mar 2014 11:49:48 +0000 Subject: [PATCH 5/6] travis.yml: Remove IRC notifications. --- .travis.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4ffef7335..47252fcff 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,8 +13,3 @@ script: - echo $TRAVIS_PYTHON_VERSION - python setup.py install - supybot-test test --plugins-dir=./build/lib*/supybot/plugins/ --no-network --disable-multiprocessing --exclude=./build/lib*/supybot/plugins/Scheduler --exclude=./build/lib*/supybot/plugins/Filter -notifications: - irc: - channels: - - "chat.freenode.net#limnoria" - on_success: change From 0c2ab9d83bf93079483411898b5f494cf21b9951 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Sat, 22 Mar 2014 11:56:38 +0000 Subject: [PATCH 6/6] RSS: Another attempt at fixing encoding issues (again). --- plugins/RSS/plugin.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/plugins/RSS/plugin.py b/plugins/RSS/plugin.py index 9482598a1..b8c81a011 100644 --- a/plugins/RSS/plugin.py +++ b/plugins/RSS/plugin.py @@ -150,15 +150,15 @@ class RSS(callbacks.Plugin): if headline[2]: pubDate = ' [%s]' % (headline[2],) if sys.version_info[0] < 3: - try: - import charade.universaldetector - u = charade.universaldetector.UniversalDetector() - u.feed(headline[0]) - u.close() - encoding = u.result['encoding'] - except ImportError: - encoding = 'utf8' if isinstance(headline[0], unicode): + try: + import charade.universaldetector + u = charade.universaldetector.UniversalDetector() + u.feed(headline[0]) + u.close() + encoding = u.result['encoding'] + except ImportError: + encoding = 'utf8' newheadlines.append(format('%s %u%s', headline[0].encode(encoding,'replace'), link,