mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-25 19:44:13 +01:00
Merge branch 'testing' of github.com:ProgVal/Limnoria into l10n-fi
This commit is contained in:
commit
8d85d01838
@ -13,8 +13,3 @@ script:
|
|||||||
- echo $TRAVIS_PYTHON_VERSION
|
- echo $TRAVIS_PYTHON_VERSION
|
||||||
- python setup.py install
|
- 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
|
- 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
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# SOME DESCRIPTIVE TITLE.
|
# Aka plugin for Limnoria
|
||||||
# Copyright (C) YEAR ORGANIZATION
|
# Copyright (C) 2014 Limnoria
|
||||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
# Mikaela Suomalainen <mikaela.suomalainen@outlook.com>, 2014.
|
||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -151,13 +151,21 @@ class RSS(callbacks.Plugin):
|
|||||||
pubDate = ' [%s]' % (headline[2],)
|
pubDate = ' [%s]' % (headline[2],)
|
||||||
if sys.version_info[0] < 3:
|
if sys.version_info[0] < 3:
|
||||||
if isinstance(headline[0], unicode):
|
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',
|
newheadlines.append(format('%s %u%s',
|
||||||
headline[0].encode('utf-8','replace'),
|
headline[0].encode(encoding,'replace'),
|
||||||
link,
|
link,
|
||||||
pubDate))
|
pubDate))
|
||||||
else:
|
else:
|
||||||
newheadlines.append(format('%s %u%s',
|
newheadlines.append(format('%s %u%s',
|
||||||
headline[0].decode('utf-8','replace'),
|
headline[0],
|
||||||
link,
|
link,
|
||||||
pubDate))
|
pubDate))
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user